1. 16 Jul, 2018 21 commits
    • [Ada] Fix expansion of 'Count in protected types · 97710dc7
      2018-07-16  Javier Miranda  <miranda@adacore.com>
      
      gcc/ada/
      
      	* exp_attr.adb (Expand_N_Attribute_Reference ['Count]): Do not
      	transform 'Count into a function call if the current scope has been
      	eliminated.
      
      From-SVN: r262703
      Javier Miranda committed
    • [Ada] Sem_Utils: make Has_Prefix public · 4bde5d8c
      2018-07-16  Javier Miranda  <miranda@adacore.com>
      
      gcc/ada/
      
      	* sem_util.ads, sem_util.adb (Has_Prefix): Move this function to the
      	public part of this package.
      
      From-SVN: r262702
      Javier Miranda committed
    • [Ada] Adjust inlining in GNATprove mode for predicate/invariant/DIC · ffafd2ab
      The frontend generates special functions for checking subtype predicates,
      type invariants and Default_Initial_Condition aspect. These are translated
      as predicates in GNATprove, and as such should no call inside these
      functions should be inlined. This is similar to the existing handling of
      calls inside expression functions.
      
      There is no impact on compilation.
      
      2018-07-16  Yannick Moy  <moy@adacore.com>
      
      gcc/ada/
      
      	* sem_res.adb (Resolve_Call): Do not inline calls inside
      	compiler-generated functions translated as predicates in GNATprove.
      
      From-SVN: r262701
      Yannick Moy committed
    • [Ada] Violation of No_Standard_Allocators_After_Elaboration not detected · b3181992
      The compiler fails to generate a call to detect allocators executed after
      elaboration in cases where the allocator is associated with Global_Pool_Object.
      The fix is to test for this associated storage pool as part of the condition
      for generating a call to System.Elaboration_Allocators.Check_Standard_Alloctor.
      Also, the exception Storage_Error is now generated instead of Program_Error
      for such a run-time violation, as required by the Ada RM in D.7.
      
      The following test must compile and execute quietly:
      
      -- Put the pragma in gnat.adc:
      pragma Restrictions (No_Standard_Allocators_After_Elaboration);
      
      package Pkg_With_Allocators is
      
         type Priv is private;
      
         procedure Allocate
           (Use_Global_Allocator : Boolean;
            During_Elaboration   : Boolean);
      
      private
      
         type Rec is record
            Int : Integer;
         end record;
      
         type Priv is access Rec;
      
      end Pkg_With_Allocators;
      
      package body Pkg_With_Allocators is
      
         Ptr : Priv;
      
         procedure Allocate
           (Use_Global_Allocator : Boolean;
            During_Elaboration   : Boolean)
         is
            type Local_Acc is access Rec;
      
            Local_Ptr : Local_Acc;
      
         begin
            if Use_Global_Allocator then
               Ptr := new Rec;  -- Raise Storage_Error if after elaboration
               Ptr.Int := 1;
            else
               Local_Ptr := new Rec;  -- Raise Storage_Error if after elaboration
               Local_Ptr.Int := 1;
            end if;
      
            if not During_Elaboration then
               raise Program_Error;  -- No earlier exception: FAIL
            end if;
      
         exception
            when Storage_Error =>
               if During_Elaboration then
                  raise Program_Error;  -- No exception expected: FAIL
               else
                  null;                 -- Expected Storage_Error: PASS
               end if;
            when others =>
               raise Program_Error;  -- Unexpected exception: FAIL
         end Allocate;
      
      begin
         Allocate (Use_Global_Allocator => True, During_Elaboration => True);
      
         Allocate (Use_Global_Allocator => False, During_Elaboration => True);
      end Pkg_With_Allocators;
      
      with Pkg_With_Allocators;
      
      procedure Alloc_Restriction_Main is
      begin
         Pkg_With_Allocators.Allocate
           (Use_Global_Allocator => True,
            During_Elaboration   => False);
      
         Pkg_With_Allocators.Allocate
           (Use_Global_Allocator => False,
            During_Elaboration   => False);
      end Alloc_Restriction_Main;
      
      2018-07-16  Gary Dismukes  <dismukes@adacore.com>
      
      gcc/ada/
      
      	* exp_ch4.adb (Expand_N_Allocator): Test for Storage_Pool being RTE in
      	addition to the existing test for no Storage_Pool as a condition
      	enabling generation of the call to Check_Standard_Allocator when the
      	restriction No_Standard_Allocators_After_Elaboration is active.
      	* libgnat/s-elaall.ads (Check_Standard_Allocator): Correct comment to
      	say that Storage_Error will be raised (rather than Program_Error).
      	* libgnat/s-elaall.adb (Check_Standard_Allocator): Raise Storage_Error
      	rather than Program_Error when Elaboration_In_Progress is False.
      
      From-SVN: r262700
      Gary Dismukes committed
    • [Ada] Fix spelling for compile-time-known · d3bbfc59
      2018-07-16  Gary Dismukes  <dismukes@adacore.com>
      
      gcc/ada/
      
      	* sem_eval.adb: Fix spelling for compile-time-known.
      
      From-SVN: r262699
      Gary Dismukes committed
    • [Ada] Illegal deferred constant causes stack overflow · 705bcbfe
      This patch prevents the compiler from entering infinite recursion when
      processing an illegal deferred constant.
      
      ------------
      -- Source --
      ------------
      
      --  types.ads
      
      package Types is
         type Enum is (One, Two);
      end Types;
      
      --  types2.ads
      
      with Types;
      
      package Types2 is
         type Enum is private;
         One : constant Enum;
         Two : constant Enum;
      
      private
         type Enum is new Types.Enum;
         One : constant Enum := One;
         Two : constant Enum := Two;
      
      end Types2;
      
      ----------------------------
      -- Compilation and output --
      ----------------------------
      
      $ gcc -c types2.ads
      types2.ads:10:04: full constant declaration appears too late
      types2.ads:11:04: full constant declaration appears too late
      
      2018-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
      
      gcc/ada/
      
      	* sem_eval.adb (Compile_Time_Known_Value): Add a guard which prevents
      	the compiler from entering infinite recursion when trying to determine
      	whether a deferred constant has a compile time known value, and the
      	initialization expression of the constant is a reference to the
      	constant itself.
      
      From-SVN: r262698
      Hristian Kirtchev committed
    • [Ada] Adjust growth factor from 1/32 to 1/2 for Unbounded_String · e05a1ce7
      This will reduce significantly the number of allocations done when
      doing consecutive append operations.
      
      2018-07-16  Nicolas Roche  <roche@adacore.com>
      
      gcc/ada/
      
      	* libgnat/a-strunb.adb, libgnat/a-strunb__shared.adb: Adjust growth
      	factor from 1/32 to 1/2 for Unbounded_String.
      
      From-SVN: r262697
      Nicolas Roche committed
    • re PR debug/86523 (ICE in gen_member_die, at dwarf2out.c:24933 starting from r262560) · 0150d9a1
      2018-07-16  Richard Biener  <rguenther@suse.de>
      
      	PR lto/86523
      	* dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
      	for function-local FUNCTION_DECL and RESULT_DECL immediately.
      
      	* g++.dg/lto/pr86523-1_0.C: New testcase.
      	* g++.dg/lto/pr86523-2_0.C: Likewise.
      
      From-SVN: r262696
      Richard Biener committed
    • Revert one more symbol_summary::get to ::get_create (PR ipa/86529). · c4d0acf8
      2018-07-16  Martin Liska  <mliska@suse.cz>
      
              PR ipa/86529
      	* ipa-pure-const.c (malloc_candidate_p): Revert ::get
              to ::get_create.
      2018-07-16  Martin Liska  <mliska@suse.cz>
      
              PR ipa/86529
      	* g++.dg/ipa/pr86529.C: New test.
      
      From-SVN: r262695
      Martin Liska committed
    • [ARC] Update ARCHS scheduling rules. · 325a4c6e
      2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* config/arc/arcHS.md: Update ARCHS scheduling rules.
      
      From-SVN: r262689
      Claudiu Zissulescu committed
    • [ARC] Add support for HS4x cpus. · 43bb0fc2
      gcc/
      2017-03-10  Claudiu Zissulescu  <claziss@synopsys.com>
      
              * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
              for ARCHS4x.
              * config/arc/arc-cpus.def (hs4x): New cpu.
              (hs4xd): Likewise.
              * config/arc/arc-tables.opt: Regenerate.
              * config/arc/arc.c (arc_sched_issue_rate): New function.
              (TARGET_SCHED_ISSUE_RATE): Define.
              (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
              * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
              fpu_cvt.
              (attr tune): Add ARCHS4x tune values.
              (attr tune_dspmpy): Define.
              (*tst): Correct instruction type.
              * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
              * config/arc/arcHS4x.md: New file.
              * config/arc/fpu.md: Update instruction type attributes.
              * config/arc/t-multilib: Regenerate.
      
      From-SVN: r262688
      Claudiu Zissulescu committed
    • [debug] Fix pre_dec handling in vartrack · 8c0e07e3
      When compiling test-case gcc.target/i386/vartrack-1.c with -O1 -g, register bx
      is pushed in the prologue and popped in the epilogue:
      ...
      (insn/f 26 3 27 2
        (set (mem:DI (pre_dec:DI (reg/f:DI 7 sp)) [0  S8 A8])
             (reg:DI 3 bx))
         "vartrack-1.c":10 61 {*pushdi2_rex64}
         (expr_list:REG_DEAD (reg:DI 3 bx) (nil)))
        ...
      (insn/f 29 28 30 2
        (set (reg:DI 3 bx)
             (mem:DI (post_inc:DI (reg/f:DI 7 sp)) [0  S8 A8]))
         "vartrack-1.c":15 71 {*popdi1}
         (expr_list:REG_CFA_ADJUST_CFA
           (set (reg/f:DI 7 sp)
                (plus:DI (reg/f:DI 7 sp)
                         (const_int 8 [0x8]))) (nil)))
      ...
      
      However, when we adjust those insns in vartrack to eliminate the pre_dec and
      post_inc, the frame location for the push is at argp - 24, while the one for the
      pop is at argp - 16:
      ...
      (insn/f 26 3 27 2
        (parallel [
          (set (mem:DI (plus:DI (reg/f:DI 16 argp)
                                (const_int -24 [0xffffffffffffffe8])) [0  S8 A8])
               (reg:DI 3 bx))
          (set (reg/f:DI 7 sp)
               (plus:DI (reg/f:DI 16 argp)
                        (const_int -24 [0xffffffffffffffe8])))
        ])
        "vartrack-1.c":10 61 {*pushdi2_rex64}
        (expr_list:REG_DEAD (reg:DI 3 bx) (nil)))
        ...
      (insn/f 29 28 30 2
        (parallel [
          (set (reg:DI 3 bx)
               (mem:DI (plus:DI (reg/f:DI 16 argp)
                                (const_int -16 [0xfffffffffffffff0])) [0  S8 A8]))
          (set (reg/f:DI 7 sp)
               (plus:DI (reg/f:DI 16 argp)
                        (const_int -8 [0xfffffffffffffff8])))
        ])
        "vartrack-1.c":15 71 {*popdi1}
        (expr_list:REG_CFA_ADJUST_CFA
          (set (reg/f:DI 7 sp)
               (plus:DI (reg/f:DI 7 sp)
                        (const_int 8 [0x8]))) (nil)))
      ...
      
      This patch fixes that by moving the stack_adjust modification after
      adjust_insn in vt_initialize.
      
      Bootstrapped and reg-tested on x86_64.
      
      2018-07-16  Tom de Vries  <tdevries@suse.de>
      
      	PR debug/86455
      	* var-tracking.c (vt_initialize): Fix pre_dec handling.
      
      	* gcc.target/i386/vartrack-1.c: New test.
      
      From-SVN: r262687
      Tom de Vries committed
    • re PR tree-optimization/86514 (wrong manipulation of 2-dimensional packed array at -O) · 5e5ef52c
      	PR tree-optimization/86514
      	* tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
      	conversion to a boolean type from a type with greater precision.
      
      From-SVN: r262684
      Eric Botcazou committed
    • Adjust email addresses. · f030b30e
      2018-07-16  Andreas Krebbel  <krebbel@linux.ibm.com>
      
      	* MAINTAINERS: Adjust email address for me and my colleague Robin
      	Dapp.
      
      From-SVN: r262683
      Andreas Krebbel committed
    • S/390: libstdc++: 64 and 32 bit baseline update · 9c588dbe
      libstdc++-v3/ChangeLog:
      
      2018-07-16  Andreas Krebbel  <krebbel@linux.ibm.com>
      
      	* config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
      	* config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
      	* config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
      
      From-SVN: r262681
      Andreas Krebbel committed
    • [vartrack] Print adjusted insn slim if TDF_SLIM · 95b855df
      2018-07-16  Tom de Vries  <tdevries@suse.de>
      
      	* var-tracking.c (vt_initialize): Print adjusted insn slim if
      	dump_flags request TDF_SLIM.
      
      From-SVN: r262680
      Tom de Vries committed
    • re PR c++/3698 (improper handling of an extern declared inline function) · 9e51f66f
      	PR c++/3698
      	PR c++/86208
      	* cp-gimplify.c (cp_genericize_r): When using extern_decl_map, or
      	in TREE_USED flag from stmt to h->to.
      
      	* g++.dg/opt/pr3698.C: New test.
      
      From-SVN: r262678
      Jakub Jelinek committed
    • re PR ipa/86389 (execute FAILs with -fipa-pta) · 6fb4417f
      2018-07-16  Richard Biener  <rguenther@suse.de>
      
      	PR ipa/86389
      	* gcc.dg/torture/pr86389.c: Require trampolines.
      
      From-SVN: r262677
      Richard Biener committed
    • fold-const.c (int_const_binop_1): Abstract... · 5f9d2c58
              * fold-const.c (int_const_binop_1): Abstract...
              (wide_int_binop): ...wide int code here.
      	(poly_int_binop): ...poly int code here.
      	(tree_binop): ...tree code here.
              * fold-const.h (wide_int_binop): New.
              * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
      	Remove useless PLUS/MINUS_EXPR case.
              (zero_nonzero_bits_from_vr): Move wide int code...
              (zero_nonzero_bits_from_bounds): ...here.
              (extract_range_from_binary_expr_1): Move mask optimization code...
              (range_easy_mask_min_max): ...here.
              * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
              (range_easy_mask_min_max): New.
      
      From-SVN: r262676
      Aldy Hernandez committed
    • Daily bump. · 5933c685
      From-SVN: r262675
      GCC Administrator committed
  2. 15 Jul, 2018 5 commits
    • re PR target/85993 (config/sh/sh.c:10878: suspicious if .. else chain) · 2cd66592
      	PR target/85993
      	* config/sh/sh.c (output_mi_thunk): Remove dead conditional
      	block.
      
      From-SVN: r262671
      Jeff Law committed
    • [testsuite/guality] Run guality tests with Og · 5155feb3
      We advertise Og as the optimization level of choice for the standard
      edit-compile-debug cycle, but do not run the guality tests for Og with the
      default torture options.
      
      This patch ensures that we test -Og in the guality tests.
      
      F.i., for gcc.dg/guality there are 45 fails for Og (while there are none for
      O1), in these test-cases:
      ...
      gcc.dg/guality/pr54200.c
      gcc.dg/guality/pr54970.c
      gcc.dg/guality/pr56154-1.c
      gcc.dg/guality/pr59776.c
      gcc.dg/guality/sra-1.c
      ...
      
      2018-07-15  Tom de Vries  <tdevries@suse.de>
      
      	* lib/gcc-gdb-test.exp (guality_minimal_options): New proc.
      	* lib/gfortran-dg.exp (gfortran-dg-runtest): Don't call torture-init if
      	already called.
      	* g++.dg/guality/guality.exp: Ensure Og is part of torture options.
      	* gcc.dg/guality/guality.exp: Same.
      	* gfortran.dg/guality/guality.exp: Same.
      
      From-SVN: r262668
      Tom de Vries committed
    • Revert "[testsuite/guality] Run guality tests with Og" · 14fa87d6
      This reverts commit 6b84828445f7875d1dddbd90a8d86b10c4e8e776.
      
      From-SVN: r262667
      Tom de Vries committed
    • [testsuite/guality] Run guality tests with Og · 873b4532
      We advertise Og as the optimization level of choice for the standard
      edit-compile-debug cycle, but do not run the guality tests for Og with the
      default torture options.
      
      This patch ensures that we test -Og in the guality tests.
      
      F.i., for gcc.dg/guality there are 45 fails for Og (while there are none for
      O1), in these test-cases:
      ...
      gcc.dg/guality/pr54200.c
      gcc.dg/guality/pr54970.c
      gcc.dg/guality/pr56154-1.c
      gcc.dg/guality/pr59776.c
      gcc.dg/guality/sra-1.c
      ...
      
      2018-07-15  Tom de Vries  <tdevries@suse.de>
      
      	* lib/gcc-gdb-test.exp (guality_minimal_options): New proc.
      	* g++.dg/guality/guality.exp: Ensure Og is part of torture options.
      	* gcc.dg/guality/guality.exp: Same.
      	* gfortran.dg/guality/guality.exp: Same.
      
      From-SVN: r262666
      Tom de Vries committed
    • Daily bump. · 8d93e01d
      From-SVN: r262665
      GCC Administrator committed
  3. 14 Jul, 2018 3 commits
  4. 13 Jul, 2018 11 commits
    • runtime: skip zero-sized fields in structs when converting to FFI · 867b003f
          
          The libffi library doesn't understand zero-sized objects.
          When we see a zero-sized field in a struct, just skip it when
          converting to the FFI data structures. There is no value to pass in
          any case, so not telling libffi about the field doesn't affect
          anything.
          
          The test case for this is https://golang.org/cl/123316.
          
          Fixes golang/go#26335
          
          Reviewed-on: https://go-review.googlesource.com/123335
      
      From-SVN: r262651
      Ian Lance Taylor committed
    • x86: Tune Skylake, Cannonlake and Icelake as Haswell · 7264261f
      r259399, which added PROCESSOR_SKYLAKE, disabled many x86 optimizations
      which are enabled by PROCESSOR_HASWELL.  As the result, -mtune=skylake
      generates slower codes on Skylake than before.  The same also applies
      to Cannonlake and Icelak tuning.
      
      This patch changes -mtune={skylake|cannonlake|icelake} to tune like
      -mtune=haswell for until their tuning is properly adjusted. It also
      enables -mprefer-vector-width=256 for -mtune=haswell, which has no
      impact on codegen when AVX512 isn't enabled.
      
      Performance impacts on SPEC CPU 2017 rate with 1 copy using
      
      -march=native -mfpmath=sse -O2 -m64
      
      are
      
      1. On Broadwell server:
      
      500.perlbench_r		-0.56%
      502.gcc_r		-0.18%
      505.mcf_r		0.24%
      520.omnetpp_r		0.00%
      523.xalancbmk_r		-0.32%
      525.x264_r		-0.17%
      531.deepsjeng_r		0.00%
      541.leela_r		0.00%
      548.exchange2_r		0.12%
      557.xz_r		0.00%
      Geomean			0.00%
      
      503.bwaves_r		0.00%
      507.cactuBSSN_r		0.21%
      508.namd_r		0.00%
      510.parest_r		0.19%
      511.povray_r		-0.48%
      519.lbm_r		0.00%
      521.wrf_r		0.28%
      526.blender_r		0.19%
      527.cam4_r		0.39%
      538.imagick_r		0.00%
      544.nab_r		-0.36%
      549.fotonik3d_r		0.51%
      554.roms_r		0.00%
      Geomean			0.17%
      
      On Skylake client:
      
      500.perlbench_r		0.96%
      502.gcc_r		0.13%
      505.mcf_r		-1.03%
      520.omnetpp_r		-1.11%
      523.xalancbmk_r		1.02%
      525.x264_r		0.50%
      531.deepsjeng_r		2.97%
      541.leela_r		0.50%
      548.exchange2_r		-0.95%
      557.xz_r		2.41%
      Geomean			0.56%
      
      503.bwaves_r		0.49%
      507.cactuBSSN_r		3.17%
      508.namd_r		4.05%
      510.parest_r		0.15%
      511.povray_r		0.80%
      519.lbm_r		3.15%
      521.wrf_r		10.56%
      526.blender_r		2.97%
      527.cam4_r		2.36%
      538.imagick_r		46.40%
      544.nab_r		2.04%
      549.fotonik3d_r		0.00%
      554.roms_r		1.27%
      Geomean			5.49%
      
      On Skylake server:
      
      500.perlbench_r		0.71%
      502.gcc_r		-0.51%
      505.mcf_r		-1.06%
      520.omnetpp_r		-0.33%
      523.xalancbmk_r		-0.22%
      525.x264_r		1.72%
      531.deepsjeng_r		-0.26%
      541.leela_r		0.57%
      548.exchange2_r		-0.75%
      557.xz_r		-1.28%
      Geomean			-0.21%
      
      503.bwaves_r		0.00%
      507.cactuBSSN_r		2.66%
      508.namd_r		3.67%
      510.parest_r		1.25%
      511.povray_r		2.26%
      519.lbm_r		1.69%
      521.wrf_r		11.03%
      526.blender_r		3.39%
      527.cam4_r		1.69%
      538.imagick_r		64.59%
      544.nab_r		-0.54%
      549.fotonik3d_r		2.68%
      554.roms_r		0.00%
      Geomean			6.19%
      
      This patch improves -march=native performance on Skylake up to 60% and
      leaves -march=native performance unchanged on Haswell.
      
      gcc/
      
      2018-07-13  H.J. Lu  <hongjiu.lu@intel.com>
      	    Sunil K Pandey  <sunil.k.pandey@intel.com>
      
      	PR target/84413
      	* config/i386/i386.c (m_CORE_AVX512): New.
      	(m_CORE_AVX2): Likewise.
      	(m_CORE_ALL): Add m_CORE_AVX2.
      	* config/i386/x86-tune.def: Replace m_HASWELL with m_CORE_AVX2.
      	Replace m_SKYLAKE_AVX512 with m_CORE_AVX512 on avx256_optimal
      	and remove the rest of m_SKYLAKE_AVX512.
      
      gcc/testsuite/
      
      2018-07-13  H.J. Lu  <hongjiu.lu@intel.com>
      	    Sunil K Pandey  <sunil.k.pandey@intel.com>
      
      	PR target/84413
      	* gcc.target/i386/pr84413-1.c: New test.
      	* gcc.target/i386/pr84413-2.c: Likewise.
      	* gcc.target/i386/pr84413-3.c: Likewise.
      
      Co-Authored-By: Sunil K Pandey <sunil.k.pandey@intel.com>
      
      From-SVN: r262649
      H.J. Lu committed
    • lto.c (do_stream_out): Add PART parameter; open dump file. · 814f3331
      
      	* lto.c (do_stream_out): Add PART parameter; open dump file.
      	(stream_out): Add PART parameter; pass it to do_stream_out.
      	(lto_wpa_write_files): Update call of stream_out.
      
      	* lto-streamer-out.c (copy_function_or_variable): Dump info about
      	copying section.
      
      From-SVN: r262645
      Jan Hubicka committed
    • emmintrin.h (_mm_and_si128): New function. · fb5f0c20
      [gcc]
      
      2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
      	    Steve Munroe  <munroesj52@gmail.com>
      
      	* config/rs6000/emmintrin.h (_mm_and_si128): New function.
      	(_mm_andnot_si128): Likewise.
      	(_mm_or_si128): Likewise.
      	(_mm_xor_si128): Likewise.
      
      [gcc/testsuite]
      
      2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
      	    Steve Munroe  <munroesj52@gmail.com>
      
      	* gcc.target/powerpc/sse2-pand-1.c: New file.
      	* gcc.target/powerpc/sse2-pandn-1.c: Likewise.
      	* gcc.target/powerpc/sse2-por-1.c: Likewise.
      	* gcc.target/powerpc/sse2-pxor-1.c: Likewise.
      
      
      Co-Authored-By: Steve Munroe <munroesj52@gmail.com>
      
      From-SVN: r262642
      Bill Schmidt committed
    • compiler: fix parsing of composite literals with omitted pointer types · 113950b7
          
          The frontend could parse omitted pointer typess at the end of the
          type, but not in the middle, so code like []*[][]int{{{1}}} failed.
          
          Test case is in https://golang.org/cl/123477.
          
          Fixes golang/go#26340
          
          Reviewed-on: https://go-review.googlesource.com/123479
      
      From-SVN: r262641
      Ian Lance Taylor committed
    • [PR c++/86374] Name lookup failure in enclosing template · 6b34716b
      https://gcc.gnu.org/ml/gcc-patches/2018-07/msg00701.html
      	PR c++/86374
      	* pt.c (lookup_template_class_1): Use tsubst_aggr_type for
      	contexts that are classes.
      	* parser.c (cp_parser_template_id): Combine entering_scope decl &
      	initializer.
      
      	PR c++/86374
      	* g++.dg/pr86374.C: New.
      
      From-SVN: r262637
      Nathan Sidwell committed
    • 3nd Patch for PR78009 · b2272b13
      https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78809
      Inline strcmp with small constant strings
      
      The design doc for PR78809 is at:
      https://www.mail-archive.com/gcc@gcc.gnu.org/msg83822.html
      
      this patch is for the third part of change of PR78809.
      
      C. for strcmp (s1, s2), strncmp (s1, s2, n), and memcmp (s1, s2, n)
         if the result is NOT used to do simple equality test against zero, one of
      "s1" or "s2" is a small constant string, n is a constant, and the Min value of
      the length of the constant string and "n" is smaller than a predefined
      threshold T,
         inline the call by a byte-to-byte comparision sequence to avoid calling
      overhead.
      
      adding test case strcmpopt_5.c into gcc.dg for part C of PR78809.
      adding test case strcmpopt_6.c into gcc.dg to test the following case:
         When the specified length exceeds one of the arguments of the call to memcmp,
         the call to memcmp should NOT be inlined.
      
      From-SVN: r262636
      Qing Zhao committed
    • arm - Add vendor and CPU id information to arm-cpus.in · b02160e5
      This patch moves the vendor and CPU id data from driver-arm.c to the
      main table of CPU data in arm-cpus.in.  It then adds rules to
      parsecpu.awk to build data tables that can be used by the driver for
      automatic CPU detection when running natively.  This is the last major
      bit of CPU-specific data that can be usefully moved to the CPU data
      tables (I don't think it is sensible to move the per-cpu tuning data
      from its current location).
      
      The syntax and parser can support revision ranges, but at present
      nothing is done with that data: no supported cpu currently needs that
      capability.
      
      	* config/arm/driver-arm.c: Include arm-native.h.
      	(host_detect_local_cpu): Use auto-generated data tables.
      	(vendors, arm_cpu_table): Delete.  Move part information to ...
      	* config/arm/arm-cpus.in: ... here.
      	* config/arm/parsecpu.awk (gen_native): New function.
      	(vendor, part): New CPU fields.
      	(END): Add support for building the native CPU detection tables.
      	* config/arm/t-arm (arm-native.h): Add build rule.
      	(driver-arm.o): Add dependency on arm-native.h.
      
      From-SVN: r262633
      Richard Earnshaw committed
    • re PR middle-end/85974 (Failure to optimize difference of two pointers into a… · 67fccea4
      re PR middle-end/85974 (Failure to optimize difference of two pointers into a compile time constant)
      
      2018-07-13  Richard Biener  <rguenther@suse.de>
      
      	PR middle-end/85974
      	* match.pd (addr1 - addr2): Allow either of the operand to
      	have a conversion.
      
      	* gcc.c-torture/compile/930326-1.c: Adjust to cover widening.
      
      From-SVN: r262632
      Richard Biener committed
    • [testsuite, guality] Add -fno-ipa-icf in gcc.dg/guality · 22539827
      Optimization fipa-icf breaks debug info (as is noted in PR63572 - "ICF
      breaks user debugging experience"), which make guality tests clztest.c,
      ctztest.c and sra-1.c unsupported for option combination "-O2 -flto
      -fuse-linker-plugin -fno-fat-lto-objects".  F.i., in clztest.c foo and bar are
      merged, and gdb can set a breakpoint on a line in foo, but trying to set a
      breakpoint on a line in bar results in a breakpoint in main instead.
      
      This patch works around the problem by adding -fno-ipa-icf (as is already done
      in csttest.c and pr43077-1.c) to those testcases:
      ...
      -UNSUPPORTED: gcc.dg/guality/clztest.c ... line . g == f
      +PASS:        gcc.dg/guality/clztest.c ... line . g == f
      -UNSUPPORTED: gcc.dg/guality/ctztest.c ... line . g == f
      +PASS:        gcc.dg/guality/ctztest.c ... line . g == f
      -UNSUPPORTED: gcc.dg/guality/sra-1.c ... line .+1 a[0] == 4
      +PASS:        gcc.dg/guality/sra-1.c ... line .+1 a[0] == 4
      -UNSUPPORTED: gcc.dg/guality/sra-1.c ... line . a[1] == 14
      +PASS:        gcc.dg/guality/sra-1.c ... line . a[1] == 14
      ...
      
      Tested on x86_64.
      
      2018-07-13  Tom de Vries  <tdevries@suse.de>
      
      	* gcc.dg/guality/clztest.c: Add -fno-ipa-icf in dg-options.
      	* gcc.dg/guality/ctztest.c: Same.
      	* gcc.dg/guality/sra-1.c: Same.
      
      From-SVN: r262631
      Tom de Vries committed
    • DFix typo · e52b0aab
      From-SVN: r262630
      Eric Botcazou committed