aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2019-02-01combine: Use TDF_DETAILS for "can't combine" dump printsSegher Boessenkool2-3/+8
Some people use the -fdump-rtl-combine dumps (instead of the -da or -fdump-rtl-combine-all dump), but the "Can't combine iN into iM" messages do not make any sense if the failed combine attempts are not printed otherwise. So let's change that. * combine.c (try_combine): Do not print "Can't combine" messages unless printing failed combination attempts. From-SVN: r268453
2019-02-01[PR hsa/87863] Set assembler name of group and global variables earlyMartin Jambor2-0/+8
2019-02-01 Martin Jambor <mjambor@suse.cz> PR hsa/87863 * omp-grid.c (grid_mark_variable_segment): Set assembler name of group segment and global segment variables before making them static. From-SVN: r268452
2019-02-01Add two missing dump_enabled_p callsMartin Jambor2-6/+13
2019-02-01 Martin Jambor <mjambor@suse.cz> * omp-grid.c (grid_target_follows_gridifiable_pattern): Guard two missed optimization dump with dump_enabled_p. From-SVN: r268451
2019-02-01compiler: support alias to pointer type as receiver in method declarationIan Lance Taylor2-1/+9
Fixes golang/go#27994. Reviewed-on: https://go-review.googlesource.com/c/160459 From-SVN: r268450
2019-02-01re PR tree-optimization/88597 (Compile time hog w/ -O1 -fpeel-loops)Richard Biener5-42/+128
2019-02-01 Richard Biener <rguenther@suse.de> PR middle-end/88597 * tree-scalar-evolution.c (analyze_scalar_evolution): Set up the instantiate cache. (instantiate_scev_binary): Elide second operand procesing if equal to the first. * tree-chrec.c (chrec_contains_symbols): Add visited set. (chrec_contains_undetermined): Likewise. (tree_contains_chrecs): Likewise. * gcc.dg/torture/pr88597.c: New testcase. From-SVN: r268449
2019-02-01* parms.def (MAX_INLINE_INSNS_SINGLE): Reduce from 400 to 200.Jan Hubicka2-2/+5
From-SVN: r268448
2019-02-01re PR tree-optimization/85497 ([graphite] ICE in set_codegen_error, at ↵Richard Biener2-0/+23
graphite-isl-ast-to-gimple.c:206) 2019-02-01 Richard Biener <rguenther@suse.de> PR tree-optimization/85497 * gcc.dg/graphite/pr85497.c: New testcase. From-SVN: r268447
2019-02-01re PR debug/87451 (FAIL: gcc.dg/debug/dwarf2/inline5.c)Richard Biener2-4/+9
2019-02-01 Richard Biener <rguenther@suse.de> PR testsuite/87451 * gcc.dg/debug/dwarf2/inline5.c: Allow more comment variants. From-SVN: r268446
2019-02-01re PR tree-optimization/89143 (comparison of abs(i) against excessive ↵Jakub Jelinek6-0/+120
constant less than UXXX_MAX no longer folded) PR tree-optimization/89143 * wide-int-range.h (wide_int_range_absu): Declare. * wide-int-range.cc (wide_int_range_absu): New function. * tree-vrp.c (extract_range_from_unary_expr): Handle ABSU_EXPR. * gcc.dg/tree-ssa/vrp121.c: New test. From-SVN: r268445
2019-02-01re PR tree-optimization/88107 (ICE in find_outermost_region_in_block, at ↵Jakub Jelinek4-5/+64
tree-cfg.c:7157) PR tree-optimization/88107 * tree-cfg.c (find_outermost_region_in_block): Add ALL argument, instead of assertion that eh_region_outermost is non-NULL, if it is NULL, set *ALL to true and return NULL. (move_sese_region_to_fn): Adjust caller, if all is set, call duplicate_eh_regions with NULL region. * gcc.dg/gomp/pr88107.c: New test. From-SVN: r268444
2019-02-01re PR c++/87175 (__attribute__)) is ignored by the parser)Jakub Jelinek4-2/+21
PR c++/87175 * parser.c (cp_parser_gnu_attributes_opt): Set ok to false if require_open failed. * g++.dg/ext/attrib57.C: New test. From-SVN: r268443
2019-02-01re PR rtl-optimization/88593 (cleanup_cfg may make cached dominance info stale)Richard Biener2-1/+10
2019-02-01 Richard Biener <rguenth@suse.de> PR rtl-optimization/88593 * mode-switching.c (optimize_mode_switching): Free dominators before calling cleanup_cfg. From-SVN: r268442
2019-02-01re PR tree-optimization/88932 (ICE: verify_ssa failed (Error: definition in ↵Bin Cheng4-1/+154
block 29 does not dominate use in block 25)) PR tree-optimization/88932 * tree-predcom.c (try_combine_chains): Get loop bbs in dom order. gcc/testsuite * gfortran.dg/pr88932.f90: New test. From-SVN: r268439
2019-02-01PR c++/88983 - ICE with switch in constexpr function.Marek Polacek4-3/+97
* constexpr.c (cxx_eval_switch_expr): Use SWITCH_COND and SWITCH_BODY. (cxx_eval_constant_expression) <case COND_EXPR>: Don't look for the label in the else branch if we found it in the then branch. * g++.dg/cpp1y/constexpr-88983.C: New test. From-SVN: r268438
2019-02-01Daily bump.GCC Administrator1-1/+1
From-SVN: r268437
2019-02-01re PR middle-end/89137 (gcc/omp-low.c:7135: possible read of uninit memory ?)Jakub Jelinek2-1/+7
PR middle-end/89137 * omp-low.c (lower_omp_task_reductions): Drop redundant test to avoid bogus clang warning. From-SVN: r268434
2019-01-31re PR fortran/88669 (Contiguous attribute wrongly rejected)Thomas Koenig4-1/+42
2019-01-31 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/88669 * resolve.c (resolve_component): If the reference is a BT_CLASS, copy the contiguous attribute from the reference and use the correct attributes. 2019-01-31 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/88669 * gfortran.dg/contiguous_9.f90: New test. From-SVN: r268432
2019-01-31PR c++/89083, c++/80864 - ICE with list initialization in template.Marek Polacek11-12/+215
* constexpr.c (adjust_temp_type): Use copy_node and change the type instead of using build_constructor. * decl.c (reshape_init_r): Don't reshape a digested initializer. Return the initializer for COMPOUND_LITERAL_P. * g++.dg/cpp0x/initlist107.C: New test. * g++.dg/cpp0x/initlist108.C: New test. * g++.dg/cpp0x/initlist109.C: New test. * g++.dg/cpp0x/initlist110.C: New test. * g++.dg/cpp0x/initlist111.C: New test. * g++.dg/cpp0x/initlist112.C: New test. * g++.dg/init/ptrfn4.C: New test. From-SVN: r268428
2019-01-31re PR target/89071 (AVX vcvtsd2ss lets us avoid PXOR dependency breaking for ↵Uros Bizjak2-17/+30
scalar float<->double and other scalar xmm,xmm instructions) PR target/89071 * config/i386/i386.md (*extendsfdf2): Split out reg->reg alternative to avoid partial SSE register stall for TARGET_AVX. (truncdfsf2): Ditto. (sse4_1_round<mode>2): Ditto. From-SVN: r268427
2019-01-31Fix bogus fix-it for FLT_MAX (PR c/89122)David Malcolm5-0/+30
PR c/89122 reports that we emit a bogus fix-it hint for the case where the code uses FLT_MAX, but has included <limits.h> rather than <float.h>: x.c:3:11: error: 'FLT_MAX' undeclared here (not in a function); did you mean 'INT_MAX'? 3 | float f = FLT_MAX; | ^~~~~~~ | INT_MAX This patch adds some knowledge of <float.h> (and <cfloat>) to known-headers.cc, fixing the issue: x.c:3:11: error: 'FLT_MAX' undeclared here (not in a function) 3 | float f = FLT_MAX; | ^~~~~~~ x.c:2:1: note: 'FLT_MAX' is defined in header '<float.h>'; did you forget to '#include <float.h>'? 1 | #include <limits.h> +++ |+#include <float.h> 2 | gcc/c-family/ChangeLog: PR c/89122 * known-headers.cc (get_stdlib_header_for_name): Add {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array. gcc/testsuite/ChangeLog: PR c/89122 * g++.dg/spellcheck-stdlib.C (test_FLT_MAX): New test. * gcc.dg/spellcheck-stdlib.c (test_FLT_MAX): New test. From-SVN: r268426
2019-01-31PR c++/88752 - ICE with lambda and constexpr if.Jason Merrill4-1/+62
In this testcase, we look for an instantiation of the outer lambda from within the inner lambda. enclosing_instantiation_of didn't handle this properly, as it assumed that any references would be from the same lambda nesting depth. Fixed thus. * cp-tree.h (LAMBDA_EXPR_INSTANTIATED): New. * pt.c (tsubst_lambda_expr): Set it. (instantiated_lambda_fn_p): Check it. (enclosing_instantiation_of): Use it. From-SVN: r268424
2019-01-31re PR middle-end/89008 (O2 and O1 results differ for simple test)Bill Schmidt2-1/+7
2018-01-31 Bill Schmidt <wschmidt@linux.ibm.com> PR tree-optimization/89008 * gimple-ssa-strength-reduction.c (slsr_process_mul): Don't process anything of the form X * 0. From-SVN: r268422
2019-01-31re PR tree-optimization/89135 (internal compiler error: in ↵Richard Biener4-2/+52
gimple_split_edge, at tree-cfg.c:2747) 2019-01-31 Richard Biener <rguenther@suse.de> PR tree-optimization/89135 * tree-ssa-phiprop.c (pass_phiprop::execute): Skip blocks with abnormal preds. * gcc.dg/torture/pr89135.c: New testcase. From-SVN: r268417
2019-01-31re PR sanitizer/89124 (__attribute__((no_sanitize_address)) interferes with ↵Jakub Jelinek4-0/+31
__attribute__((target(xxx)))) PR sanitizer/89124 * ipa-inline.c (sanitize_attrs_match_for_inline_p): Allow inlining always_inline callees into no_sanitize_address callers. * c-c++-common/asan/pr89124.c: New test. From-SVN: r268415
2019-01-31re PR rtl-optimization/89115 (compile time and memory hog)Richard Biener2-1/+8
2019-01-31 Richard Biener <rguenther@suse.de> PR rtl-optimization/89115 * lra.c (lra_rtx_hash): Properly hash CONST_INT values. From-SVN: r268414
2019-01-31re PR libstdc++/88170 (pretty printer FAILs)Jakub Jelinek4-12/+24
PR libstdc++/88170 * c-pretty-print.c (pp_c_enumeration_constant): Print always as a C cast in pp_c_flag_gnu_v3 mode. * cxx-pretty-print.c (pp_cxx_enumeration_constant): Print always as a C cast in pp_c_flag_gnu_v3 mode. From-SVN: r268413
2019-01-31re PR fortran/52564 (Accepts invalid: Missing I/O list after comma)Jerry DeLisle4-0/+35
2019-01-30 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/52564 * io.c (match_io): Add check for comma after '*' without subsequent IO list. * gfortran.dg/print_2.f90: New test. From-SVN: r268412
2019-01-30PR other/89106 - cast-to-union documentation incorrect w.r.t. lvaluenessMartin Sebor2-9/+33
gcc/ChangeLog: PR other/89106 * doc/extend.texi (cast to a union): Correct and expand. From-SVN: r268411
2019-01-31Daily bump.GCC Administrator1-1/+1
From-SVN: r268410
2019-01-31re PR c++/88988 (ICE: Segmentation fault (in lookup_name_real_1))Jakub Jelinek2-0/+9
PR c++/88988 * lambda.c (is_capture_proxy): Don't return true for DECL_OMP_PRIVATIZED_MEMBER artificial vars. * testsuite/libgomp.c++/pr88988.C: New test. From-SVN: r268407
2019-01-30re PR rtl-optimization/87246 (ICE in decompose_normal_address, at ↵Vladimir Makarov4-13/+52
rtlanal.c:6379) 2019-01-30 Vladimir Makarov <vmakarov@redhat.com> PR rtl-optimization/87246 * lra-constraints.c (simplify_operand_subreg): Reload memory in subreg if the address became invalid. 2019-01-30 Vladimir Makarov <vmakarov@redhat.com> PR rtl-optimization/87246 * gcc.target/i386/pr87246.c: New. From-SVN: r268404
2019-01-30re PR target/87064 (libgomp.oacc-fortran/reduction-3.f90 fails starting with ↵Bill Schmidt2-1/+7
r263751) 2019-01-30 Bill Schmidt <wschmidt@linux.ibm.com> PR target/87064 * config/rs6000/vsx.md (*vsx_reduc_<VEC_reduc_name>_v4sf_scalar): Disable for little-endian. From-SVN: r268403
2019-01-30PR c++/89119 - ICE with value-initialization in template.Marek Polacek4-0/+38
* pt.c (tsubst_copy_and_build): Handle RANGE_EXPR. * g++.dg/cpp0x/initlist-value3.C: New test. From-SVN: r268400
2019-01-30compiler: support alias to pointer type as method receiverIan Lance Taylor2-1/+5
Fixes golang/go#28252. Reviewed-on: https://go-review.googlesource.com/c/160077 From-SVN: r268397
2019-01-30re PR fortran/52884 (double precision constants promoted to 16 byte by ↵Dominique d'Humieres2-21/+36
-fdefault-real-8) 2019-01-30 Dominique d'Humieres <dominiq@gcc.gnu.org> PR fortran/52884 * invoke.texi: Document the promotion of double precision constants. From-SVN: r268396
2019-01-30re PR rtl-optimization/89115 (compile time and memory hog)Richard Biener2-1/+18
2019-01-30 Richard Biener <rguenther@suse.de> PR rtl-optimization/89115 * opts.c (default_options_optimization): Reduce PARAM_MAX_DSE_ACTIVE_LOCAL_STORES by a factor of 10 at -O1. Make PARAM_LOOP_INVARIANT_MAX_BBS_IN_LOOP reduction relative to the default. From-SVN: r268394
2019-01-30rs6000-c.c (altivec-resolve_overloaded_builtin): Change handling of ↵Kelvin Nilsen13-1/+309
ALTIVEC_BUILTIN_VEC_EXTRACT. gcc/ChangeLog: 2019-01-30 Kelvin Nilsen <kelvin@gcc.gnu.org> * config/rs6000/rs6000-c.c (altivec-resolve_overloaded_builtin): Change handling of ALTIVEC_BUILTIN_VEC_EXTRACT. Coerce result to type of vector element when vec_extract is implemented by direct move. gcc/testsuite/ChangeLog: 2019-01-30 Kelvin Nilsen <kelvin@gcc.gnu.org> * gcc.target/powerpc/vec-extract-schar-1.c: New test. * gcc.target/powerpc/vec-extract-sint-1.c: New test. * gcc.target/powerpc/vec-extract-sint128-1.c: New test. * gcc.target/powerpc/vec-extract-slong-1.c: New test. * gcc.target/powerpc/vec-extract-sshort-1.c: New test. * gcc.target/powerpc/vec-extract-uchar-1.c: New test. * gcc.target/powerpc/vec-extract-uint-1.c: New test. * gcc.target/powerpc/vec-extract-uint128-1.c: New test. * gcc.target/powerpc/vec-extract-ulong-1.c: New test. * gcc.target/powerpc/vec-extract-ushort-1.c: New test. From-SVN: r268391
2019-01-30Default compute dimensions: list "-fopenacc-dim" in documentationThomas Schwinge2-1/+7
gcc/ * doc/invoke.texi (C Language Options): List "-fopenacc-dim". From-SVN: r268390
2019-01-30re PR tree-optimization/89111 (wrong code at -O1 and above on x86_64-linux-gnu)Richard Biener4-1/+46
2019-01-30 Richard Biener <rguenther@suse.de> PR tree-optimization/89111 * tree-ssa-loop-im.c (gather_mem_refs_stmt): Restrict canonicalization to appropriately sized access types. * gcc.dg/torture/pr89111.c: New testcase. From-SVN: r268388
2019-01-30Cache effective-target llvm_binutils result.Andrew Stubbs2-2/+9
2019-01-30 Andrew Stubbs <ams@codesourcery.com> PR testsuite/88920 gcc/testsuite/ * lib/target-supports.exp: Cache result. From-SVN: r268384
2019-01-30re PR c++/89105 (-Wabi warns for functions with internal linkage)Jakub Jelinek4-0/+30
PR c++/89105 * config/i386/i386.c (ix86_warn_parameter_passing_abi): Don't warn for arguments to functions that are TU-local and shouldn't be referenced by assembly. * g++.target/i386/pr89105.C: New test. From-SVN: r268382
2019-01-30re PR c/89061 (GCC 9 introduces false positive in -Wjump-misses-init)Jakub Jelinek5-0/+53
PR c/89061 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define. * c-decl.c (decl_jump_unsafe): Return false for C_DECL_COMPOUND_LITERAL_P decls. (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P. * gcc.dg/pr89061.c: New test. From-SVN: r268381
2019-01-30dumpfile.c (opt_info_switch_p_1): Ignore '-' if it appears after '='.Ulrich Drepper2-3/+7
* dumpfile.c (opt_info_switch_p_1): Ignore '-' if it appears after '='. From-SVN: r268380
2019-01-29PR middle-end/88956 - ICE: Floating point exception on a memcpy fromMartin Sebor4-8/+168
PR middle-end/88956 - ICE: Floating point exception on a memcpy from a zero-length constant array gcc/ChangeLog: PR c/88956 * gimple-fold.c (fold_array_ctor_reference): Avoid zero-length arrays. gcc/testsuite/ChangeLog: PR c/88956 * gcc.dg/Warray-bounds-39.c: New test. From-SVN: r268378
2019-01-29PR c++/86943 - wrong code converting lambda to function pointer.Jason Merrill5-23/+111
In this PR, instantiating the static thunk returned from the generic lambda conversion function template was using normal overload resolution, which meant calling an extra constructor when forwarding its argument. Fixed by special-casing thunk calls significantly more. * lambda.c (maybe_add_lambda_conv_op): Use a template-id in the call. Only forward parms for decltype. * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Handle CALL_FROM_THUNK_P specially. * typeck.c (check_return_expr): Don't mess with a thunk call. From-SVN: r268377
2019-01-30re PR testsuite/89110 (r268343 breaks several tests in c++2a)Marek Polacek5-7/+15
PR testsuite/89110 * g++.dg/other/nontype-1.C: Expect error in all modes. * g++.dg/parse/crash13.C: Likewise. * g++.dg/parse/error36.C: Likewise. * g++.dg/template/error29.C: Likewise. From-SVN: r268376
2019-01-30Daily bump.GCC Administrator1-1/+1
From-SVN: r268375
2019-01-29re PR fortran/57048 (Handling of C_PTR and C_FUNPTR leads to reject valid)Thomas Koenig5-0/+77
2019-01-29 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/57048 * interface.c (gfc_compare_types): If a derived type and an integer both have a derived type, and they are identical, this is a C binding type and compares equal. 2019-01-29 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/57048 * gfortran.dg/c_funptr_1.f90: New file. * gfortran.dg/c_funptr_1_mod.f90: New file. From-SVN: r268372
2019-01-29re PR c++/66676 (pragma omp simd aligned(x) results in "internal compiler ↵Jakub Jelinek4-11/+40
error: Segmentation fault") PR c++/66676 PR ipa/89104 * omp-simd-clone.c (simd_clone_clauses_extract) <case OMP_CLAUSE_ALIGNED>: Ignore clauses with NULL OMP_CLAUSE_ALIGNED_ALIGNMENT. * gcc.dg/gomp/pr89104.c: New test. From-SVN: r268370
2019-01-29PR c++/89089 - ICE with [[no_unique_address]].Jason Merrill5-16/+96
In 89089, we were never actually setting DECL_SIZE on an empty data member, because its type is a POD, so we didn't set it in the maybe-overlapping section. Fixed by also handling empty types there. In 88865, we were failing to consider empty data members in include_empty_classes. Fixed by making end_of_class always include them. While looking at these I noticed that the ABI says that a potentially-overlapping data member makes its class non-layout-POD, and that an empty data member doesn't prevent its class from being empty, so I've implemented those points as well. PR c++/88865 - wrong layout with [[no_unique_address]]. * class.c (check_field_decls): A potentially-overlapping field makes the class non-layout-POD, but not non-empty. (end_of_class): Always consider empty data members. (layout_class_type): Set DECL_SIZE for empty fields. From-SVN: r268368