[Bug middle-end/104550] bogus warning from -Wuninitialized + -ftrivial-auto-var-init=pattern
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104550 --- Comment #13 from rguenther at suse dot de --- On Wed, 16 Feb 2022, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104550 > > Jakub Jelinek changed: > >What|Removed |Added > > CC||jakub at gcc dot gnu.org > > --- Comment #8 from Jakub Jelinek --- > Well, for the .DEFERRED_INIT case if the var ends up in memory, I really don't > see the point in any clear_padding, .DEFERRED_INIT expansion should just > initialize the whole DECL_RTL MEM_P slot with the pattern it wants, trying to > initialize only the non-padding bits and then only the padding bits next to > each other is a waste of CPU cycles. > Another case are C++ vars with non-trivial ctors, if we for -flifetime-dse=2 > emit CLOBBERs at the start of such ctors, then IMNSHO the right thing is to > emit the zero or pattern initialization in those constructors, perhaps through > .DEFERRED_INIT. > This is the start_preparsed_function > if (!processing_template_decl > && (flag_lifetime_dse > 1) > && DECL_CONSTRUCTOR_P (decl1) > && !DECL_CLONED_FUNCTION_P (decl1) > /* Clobbering an empty base is harmful if it overlays real data. */ > && !is_empty_class (current_class_type) > /* We can't clobber safely for an implicitly-defined default constructor > because part of the initialization might happen before we enter the > constructor, via AGGR_INIT_ZERO_FIRST (c++/68006). */ > && !implicit_default_ctor_p (decl1)) > finish_expr_stmt (build_clobber_this ()); > case. Advantage of doing it in the ctor is that if it isn't inlined, it is > done just once per type, doesn't need to be duplicated in all the spots that > use it. > Of course, if the above conditions aren't met, then it still needs to be > initialized somewhere else like where it is done currently, or for the case of > vars with constructors for which we don't emit it perhaps do > __builtin_clear_padding after the constructor (but can we be sure that the > ctor > hasn't e.g. performed placement new and built in itself some other class?). > > Anyway, doing __builtin_clear_padding at RTL expansion time might be > non-trivial. One thing we still haven't decided on what to do with the > virtual > inheritance, whether we need a langhook which won't be there at expansion > time, > or if we can just use binfo (but doesn't free_lang_data mess up with binfo > too)? > And right now the code has two main possibilities, either emit gimple code to > do the clearing, or set a padding bitmask in memory. For RTL, either one > could > use the latter and turn that into RTL code clearing, or we would need a third > mode in which it would be emitting RTL directly. Emitting such code early has > the advantage of store-merging and all kinds of other optimizations though... There's also the option to do .DEFERRED_INIT expansion on GIMPLE somewhere, maybe in ISEL. But sure, if padding clearing needs a langhook that's a no-go. BINFOs are preserved to the extent needed for devirtualization. I suppose the mask could also be precomputed and stuck into the .DEFERRED_INIT call itself somehow ... (encoded into some sequence of variable number of args? , , , , 0)
[Bug tree-optimization/104579] vectorizer failed to reduce max & index search together
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104579 --- Comment #3 from Hongtao.liu --- (In reply to Hongtao.liu from comment #2) > One possible way is sink maxInt = src[i] out of loop, when there's > synchronised index search in the loop, just like below. > For scalar part, it's 1 conditional movement in loop vs. 1 load out of loop.
[Bug tree-optimization/103219] [12 Regression] ICE Segmentation fault at -O3 (during GIMPLE pass: unrolljam) since r12-4526-gd8edfadfc7a9795b
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103219 Richard Biener changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED Target Milestone|9.5 |12.0 Summary|[9/10/11 Regression] ICE|[12 Regression] ICE |Segmentation fault at -O3 |Segmentation fault at -O3 |(during GIMPLE pass:|(during GIMPLE pass: |unrolljam) since|unrolljam) since |r12-4526-gd8edfadfc7a9795b |r12-4526-gd8edfadfc7a9795b --- Comment #6 from Richard Biener --- Actually the use was new in GCC 12.
[Bug target/104580] New: [nvptx] Use prevent_branch_around_nothing only when necessary
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104580 Bug ID: 104580 Summary: [nvptx] Use prevent_branch_around_nothing only when necessary Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: vries at gcc dot gnu.org Target Milestone: --- I had the following idea: The prevent_branch_around_nothing workaround was added to force a uniform warp after this: ... { .reg.u32%x; mov.u32 %x, %tid.x; setp.ne.u32 %r23, %x, 0; } @%r23 bra $L2; $L2: ... With TARGET_PTX_6_0, we enforce a uniform warp by using bar.warp.sync, and consequently this workaround is not necessary anymore. ... However, this introduces the following regression: ... FAIL: libgomp.fortran/task-detach-8.f90 -Os execution test FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-7.c -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none -O0 -DGOMP_NVPTX_JIT=-O0 execution test ... Needs investigation. Either the idea is wrong, or the tests FAIL for some other reason.
[Bug target/104580] [nvptx] Use prevent_branch_around_nothing only when necessary
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104580 --- Comment #1 from Tom de Vries --- Created attachment 52457 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52457&action=edit Tentative patch
[Bug target/100784] [10/11 Regression] ICE: Segmentation fault, contains_struct_check(tree_node*, tree_node_structure_enum, char const*, int, char const*)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100784 --- Comment #6 from CVS Commits --- The releases/gcc-11 branch has been updated by Richard Biener : https://gcc.gnu.org/g:2b1b5b16f3b45647b1be87cbbe7fe8b4b854b7c3 commit r11-9581-g2b1b5b16f3b45647b1be87cbbe7fe8b4b854b7c3 Author: Richard Biener Date: Thu Jan 20 14:34:33 2022 +0100 target/100784 - avoid ICE with folding __builtin_ia32_shufpd This avoids ICEing when there is no LHS on the call by following what foldings of other builtins do in , namely not folding. 2022-01-20 Richard Biener PR target/100784 * config/i386/i386.c (ix86_gimple_fold_builtin): Check for LHS before folding __builtin_ia32_shufpd and friends. (cherry picked from commit d63d9c3dd160dce24f0209f193b8e7388b19f712)
[Bug middle-end/100786] [9/10/11 Regression] ICE: in fold_convert_loc with alias attribute and different types and different sizes
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100786 --- Comment #6 from CVS Commits --- The releases/gcc-11 branch has been updated by Richard Biener : https://gcc.gnu.org/g:6525b9fb23ec442f32b1809a2b44c415c0910387 commit r11-9582-g6525b9fb23ec442f32b1809a2b44c415c0910387 Author: Richard Biener Date: Thu Jan 20 14:25:51 2022 +0100 middle-end/100786 - constant folding from incompatible alias The following avoids us ICEing doing constant folding from variables with aliases of different types. The issue appears both in folding and CCP and FRE can do more fancy stuff to still constant fold cases where the load is smaller than the initializer so defer it to there. 2022-01-20 Richard Biener PR middle-end/100786 * gimple-fold.c (get_symbol_constant_value): Only return values of compatible type to the symbol. * gcc.dg/torture/pr100786.c: New testcase. (cherry picked from commit 5c12507f5d0bc080e4f346af99824e039236e61c)
[Bug tree-optimization/103361] [9/10/11 Regression] ICE in adjust_unroll_factor, at gimple-loop-jam.c:407 since r12-3677-gf92901a508305f29
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103361 --- Comment #7 from CVS Commits --- The releases/gcc-11 branch has been updated by Richard Biener : https://gcc.gnu.org/g:d2f4753d4ff0edf944281cc2e4d5b5b91a9f14c9 commit r11-9583-gd2f4753d4ff0edf944281cc2e4d5b5b91a9f14c9 Author: Richard Biener Date: Tue Nov 23 10:11:41 2021 +0100 tree-optimization/103361 - fix unroll-and-jam direction vector handling This properly uses lambda_int instead of truncating the direction vector to int which leads to false unexpected negative values. 2021-11-23 Richard Biener PR tree-optimization/103361 * gimple-loop-jam.c (adjust_unroll_factor): Use lambda_int for the dependence distance. * tree-data-ref.c (print_lambda_vector): Properly print a lambda_int. * g++.dg/torture/pr103361.C: New testcase. (cherry picked from commit 6cd440670078af89d82cbb67e01a5ecec8eec238)
[Bug c/104532] ICE in lvalue_p, at c/c-typeck.cc:4987
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104532 --- Comment #3 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:f99ad11af953568e1a01e4f4fe31cba0f11879a5 commit r12-7274-gf99ad11af953568e1a01e4f4fe31cba0f11879a5 Author: Jakub Jelinek Date: Thu Feb 17 10:29:06 2022 +0100 openmp: Ensure proper diagnostics for -> in map/to/from clauses [PR104532] The following patch uses the functions normal CPP_DEREF parsing uses, i.e. convert_lvalue_to_rvalue and build_indirect_ref, instead of blindly calling build_simple_mem_ref, so that if the variable does not have correct type, we properly diagnose it instead of ICEing on it. 2022-02-17 Jakub Jelinek PR c/104532 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use convert_lvalue_to_rvalue and build_indirect_ref instead of build_simple_mem_ref. * gcc.dg/gomp/pr104532.c: New test.
[Bug c/104532] ICE in lvalue_p, at c/c-typeck.cc:4987
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104532 Jakub Jelinek changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #4 from Jakub Jelinek --- Fixed.
[Bug c++/104565] [10/11/12 Regression] constexpr template goes wrong with class and call to constexpr method
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104565 Richard Biener changed: What|Removed |Added Priority|P3 |P2
[Bug c++/104568] [10/11/12 Regression] ICE [c++20] caused by option "-std=c++20 -Wall" when operand of operator new has size equal to 0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104568 Richard Biener changed: What|Removed |Added Priority|P3 |P2
[Bug fortran/104570] [12 Regression] ICE in gfc_conv_scalarized_array_ref, at fortran/trans-array.cc:3681
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104570 Richard Biener changed: What|Removed |Added Priority|P3 |P4 Target Milestone|--- |12.0
[Bug tree-optimization/104579] vectorizer failed to reduce max & index search together
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104579 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Blocks||53947 Last reconfirmed||2022-02-17 --- Comment #4 from Richard Biener --- Yes, you can re-materialize maxInt outside of the loop but you have to update it during the loop as well which will end up not fixing the issue. Btw, this bug has a duplicate somewhere. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947 [Bug 53947] [meta-bug] vectorizer missed-optimizations
[Bug tree-optimization/103544] [11 Regression] compiler crashes when trying to vectorize loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103544 --- Comment #9 from CVS Commits --- The releases/gcc-11 branch has been updated by Richard Biener : https://gcc.gnu.org/g:d1dc0f6222ecb6eda674e708235c7bc0d90fa987 commit r11-9584-gd1dc0f6222ecb6eda674e708235c7bc0d90fa987 Author: Richard Biener Date: Mon Dec 6 11:43:28 2021 +0100 tree-optimization/103544 - SLP reduction chain as SLP reduction issue When SLP reduction chain vectorization support added handling of an outer conversion in the chain picking a failed reduction up as SLP reduction that broke the invariant that the whole reduction was forward reachable. The following plugs that hole noting a future enhancement possibility. 2021-12-06 Richard Biener PR tree-optimization/103544 * tree-vect-slp.c (vect_analyze_slp): Only add a SLP reduction opportunity if the stmt in question is the reduction root. * gcc.dg/vect/pr103544.c: New testcase. (cherry picked from commit ee01694151edc7e8aef84dc3c484469e2ae443a0)
[Bug tree-optimization/103544] [11 Regression] compiler crashes when trying to vectorize loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103544 --- Comment #10 from CVS Commits --- The releases/gcc-11 branch has been updated by Richard Biener : https://gcc.gnu.org/g:c08d4266e48d52b7f8d16c79d3471be40ff56acc commit r11-9585-gc08d4266e48d52b7f8d16c79d3471be40ff56acc Author: Richard Biener Date: Tue Jan 4 10:12:47 2022 +0100 tree-optimization/103864 - SLP reduction of reductions with conversions This generalizes the fix for PR103544 to also cover reductions that are not reduction chains and does not consider reductions wrapped in sign conversions for SLP reduction handling. 2022-01-04 Richard Biener PR tree-optimization/103864 PR tree-optimization/103544 * tree-vect-slp.c (vect_analyze_slp_instance): Exclude reductions wrapped in conversions from SLP handling. (vect_analyze_slp): Revert PR103544 change. * gcc.dg/vect/pr103864.c: New testcase. (cherry picked from commit 1a15451da14410bf2bd6ec8f5baba1014638c67a)
[Bug tree-optimization/103864] [11 Regression] ICE in vect_transform_reduction, at tree-vect-loop.c:7389 since r10-4675-g05101d1b575a57ca26e4275e971da85a0dd1d52a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103864 --- Comment #8 from CVS Commits --- The releases/gcc-11 branch has been updated by Richard Biener : https://gcc.gnu.org/g:c08d4266e48d52b7f8d16c79d3471be40ff56acc commit r11-9585-gc08d4266e48d52b7f8d16c79d3471be40ff56acc Author: Richard Biener Date: Tue Jan 4 10:12:47 2022 +0100 tree-optimization/103864 - SLP reduction of reductions with conversions This generalizes the fix for PR103544 to also cover reductions that are not reduction chains and does not consider reductions wrapped in sign conversions for SLP reduction handling. 2022-01-04 Richard Biener PR tree-optimization/103864 PR tree-optimization/103544 * tree-vect-slp.c (vect_analyze_slp_instance): Exclude reductions wrapped in conversions from SLP handling. (vect_analyze_slp): Revert PR103544 change. * gcc.dg/vect/pr103864.c: New testcase. (cherry picked from commit 1a15451da14410bf2bd6ec8f5baba1014638c67a)
[Bug tree-optimization/103544] [11 Regression] compiler crashes when trying to vectorize loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103544 Richard Biener changed: What|Removed |Added Known to work||11.2.1 Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #11 from Richard Biener --- Fixed.
[Bug tree-optimization/103864] [11 Regression] ICE in vect_transform_reduction, at tree-vect-loop.c:7389 since r10-4675-g05101d1b575a57ca26e4275e971da85a0dd1d52a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103864 Richard Biener changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED Known to work||11.2.1 --- Comment #9 from Richard Biener --- Fixed.
[Bug debug/104557] [12 Regression] ICE: in simplify_subreg, at simplify-rtx.cc:7324 with -O -g
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104557 --- Comment #3 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:1c2b44b52364cb5661095b346de794bc7ff02866 commit r12-7275-g1c2b44b52364cb5661095b346de794bc7ff02866 Author: Jakub Jelinek Date: Thu Feb 17 11:14:38 2022 +0100 valtrack: Avoid creating raw SUBREGs with VOIDmode argument [PR104557] After the recent r12-7240 simplify_immed_subreg changes, we bail on more simplify_subreg calls than before, e.g. apparently for decimal modes in the NaN representations we almost never preserve anything except the canonical {q,s}NaNs. simplify_gen_subreg will punt in such cases because a SUBREG with VOIDmode is not valid, but debug_lowpart_subreg wants to attempt even harder, even if e.g. target indicates certain mode combinations aren't valid for the backend, dwarf2out can still handle them. But a SUBREG from a VOIDmode operand is just too much, the inner mode is lost there. We'd need some new rtx that would be able to represent those cases. For now, just punt in those cases. 2022-02-17 Jakub Jelinek PR debug/104557 * valtrack.cc (debug_lowpart_subreg): Don't call gen_rtx_raw_SUBREG if expr has VOIDmode. * gcc.dg/dfp/pr104557.c: New test.
[Bug tree-optimization/102893] [9/10/11 Regression] CDDCE does not detect empty infinite nested loops
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102893 Richard Biener changed: What|Removed |Added Depends on||45178 --- Comment #5 from Richard Biener --- The fix depends on the fix for PR45178. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45178 [Bug 45178] CDDCE doesn't eliminate conditional code in infinite loop
[Bug debug/104557] [12 Regression] ICE: in simplify_subreg, at simplify-rtx.cc:7324 with -O -g
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104557 Jakub Jelinek changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #4 from Jakub Jelinek --- Fixed.
[Bug go/100537] [12 Regression] Bootstrap-O3 and bootstrap-debug fail on 32-bit ARM after gcc-12-657-ga076632e274a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100537 --- Comment #19 from Richard Biener --- Ian, the PR100464 fix depends on this but when trying to cherry-pick the Go fix to the gcc-11 branch I get a conflict in gcc/go/gofrontend/MERGE: <<< HEAD 9782e85bef1c16c72a4980856d921cea104b129c === 5a801b15699cced5203af5c7339b375cd55ecbac >>> 358832c46a3 (compiler: mark global variables whose address is taken) The first line of this file holds the git revision number of the last merge done from the gofrontend repository. How should I handle backporting of such fixes?
[Bug libstdc++/102358] niter_base and miter_base overloaded for move_iterator missing constexpr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102358 --- Comment #3 from Jonathan Wakely --- (In reply to Artur Bać from comment #2) > "* include/bits/stl_iterator.h (__niter_base): Make constexpr for C++20." > > c++20 ? > according to cppreference make_move_iterator is constexpr since c++17 > https://en.cppreference.com/w/cpp/iterator/make_move_iterator Yes, and that's what libstdc++ does. __niter_base is a different function.
[Bug middle-end/98465] Bogus -Wstringop-overread with -std=gnu++20 -O2 and std::string::insert
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98465 --- Comment #43 from Jonathan Wakely --- And updating vstring is exactly what I'd like to avoid. It's pretty much on life support as far as I'm concerned.
[Bug c++/104567] SFINAE check failure with trying to access member field on the default template argument for a function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104567 Jonathan Wakely changed: What|Removed |Added Known to fail||12.0 --- Comment #4 from Jonathan Wakely --- A testcase that shows the bug is a lot more useful than one that needs something uncommented to show the bug. template constexpr bool has_char_static_param(int) { return true; } template constexpr bool has_char_static_param(...) { return false; } struct works1 { constexpr static char param[] = "param"; }; struct works2 { constexpr static int param = 0; }; struct fails { char const* param; // not static }; static_assert(has_char_static_param(0), ""); static_assert(!has_char_static_param(0), ""); static_assert(!has_char_static_param(0), ""); // FAILS
[Bug c++/51336] [C++11] warn on inaccessible template special member functions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51336 --- Comment #10 from Jonathan Wakely --- The name temploid got replaced by "templated entity", see [temp.pre].
[Bug tree-optimization/101158] [10 Regression] ICE in gimple_call_arg, at gimple.h:3247
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101158 --- Comment #5 from CVS Commits --- The releases/gcc-10 branch has been updated by Richard Biener : https://gcc.gnu.org/g:578bc9d1cdd91694e4da393d32f0fddd213a6042 commit r10-10460-g578bc9d1cdd91694e4da393d32f0fddd213a6042 Author: Richard Biener Date: Tue Jun 22 09:24:24 2021 +0200 tree-optimization/101158 - adjust SLP call matching sequence This moves the check for same operands after verifying we're facing compatible calls. 2021-06-22 Richard Biener PR tree-optimization/101158 * tree-vect-slp.c (vect_build_slp_tree_1): Move same operand checking after checking for matching operation. * gfortran.dg/pr101158.f90: New testcase. (cherry picked from commit 7a22d8a764418265680a6bb9a9aec31e984eb015)
[Bug tree-optimization/100923] [9/10 Regression] wrong code at -O2 and above on x86_64-linux-gnu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100923 --- Comment #9 from CVS Commits --- The releases/gcc-10 branch has been updated by Richard Biener : https://gcc.gnu.org/g:a650dc2deb2b6906334c6b06991255f46df93c16 commit r10-10461-ga650dc2deb2b6906334c6b06991255f46df93c16 Author: Richard Biener Date: Tue Jun 8 12:52:12 2021 +0200 tree-optimization/100923 - fix alias-ref construction wrt availability This PR shows that building an ao_ref from value-numbers is prone to expose bogus contextual alias info to the oracle. The following makes sure to construct ao_refs from SSA names available at the program point only. On the way it modifies the awkward valueize_refs[_1] API. 2021-06-08 Richard Biener PR tree-optimization/100923 * tree-ssa-sccvn.c (valueize_refs_1): Take a pointer to the operand vector to be valueized. (valueize_refs): Likewise. (valueize_shared_reference_ops_from_ref): Adjust. (valueize_shared_reference_ops_from_call): Likewise. (vn_reference_lookup_3): Likewise. (vn_reference_lookup_pieces): Likewise. Re-valueize with honoring availability when we are about to create the ao_ref and valueized before. (vn_reference_lookup): Likewise. (vn_reference_insert_pieces): Adjust. * gcc.dg/torture/pr100923.c: New testcase. (cherry picked from commit 7a56d3d3e99cc77ad8a6a674870c814da6225675)
[Bug ipa/102762] [10 Regression] ICE with -O2: Segmentation fault, memcpy, copy_bb
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102762 --- Comment #6 from CVS Commits --- The releases/gcc-10 branch has been updated by Richard Biener : https://gcc.gnu.org/g:724177df8e159dc3f70cd0e13a598e10dd321f37 commit r10-10462-g724177df8e159dc3f70cd0e13a598e10dd321f37 Author: Richard Biener Date: Fri Oct 15 08:41:57 2021 +0200 ipa/102762 - fix ICE with invalid __builtin_va_arg_pack () use We have to be careful to not break the argument space calculation. If there's not enough arguments just do not append any. 2021-10-15 Richard Biener PR ipa/102762 * tree-inline.c (copy_bb): Avoid underflowing nargs. * gcc.dg/torture/pr102762.c: New testcase. (cherry picked from commit 11a4714860d2df6ba496d55379e7dc702d5fc425)
[Bug tree-optimization/102798] [9/10 Regression] wrong code with -O3 -fno-tree-pta by r9-2475
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102798 --- Comment #14 from CVS Commits --- The releases/gcc-10 branch has been updated by Richard Biener : https://gcc.gnu.org/g:6a6ed1bd9d0b20d0ec0ca6d7ab1e0cefe57db687 commit r10-10463-g6a6ed1bd9d0b20d0ec0ca6d7ab1e0cefe57db687 Author: Richard Biener Date: Mon Oct 18 09:10:43 2021 +0200 tree-optimization/102798 - avoid copying PTA info to old SSA names The vectorizer duplicates pointer-info to created pointer bases but it has to avoid changing points-to info on existing SSA names because there's now flow-sensitive info in there (pt->pt_null as set from VRP). 2021-10-18 Richard Biener PR tree-optimization/102798 * tree-vect-data-refs.c (vect_create_addr_base_for_vector_ref): Only copy points-to info to newly generated SSA names. * gcc.dg/pr102798.c: New testcase. (cherry picked from commit 1631d6d2910e03e4517079d6e6ad0ae1aeb24dfa)
[Bug tree-optimization/103181] [9/10 Regression] wrong code at -O1 due to conditional division by 0 being executed
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103181 --- Comment #8 from CVS Commits --- The releases/gcc-10 branch has been updated by Richard Biener : https://gcc.gnu.org/g:5f5c26a2f02572996efd2b2de0dd5600ad7e91e7 commit r10-10464-g5f5c26a2f02572996efd2b2de0dd5600ad7e91e7 Author: Richard Biener Date: Thu Nov 11 09:40:36 2021 +0100 middle-end/103181 - fix operation_could_trap_p for vector division For integer vector division we only checked for all zero vector constants rather than checking whether any element in the constant vector is zero. It also fixes the adjustment to operation_could_trap_helper_p where I failed to realize that RDIV_EXPR is also used for fixed-point types. It also fixes that handling by properly checking for a fixed_zerop divisor. 2021-11-11 Richard Biener PR middle-end/103181 PR middle-end/103248 * tree-eh.c (operation_could_trap_helper_p): Properly check vector constants for a zero element for integer division. Separate floating point and integer division code. Properly handle fixed-point RDIV_EXPR. * gcc.dg/torture/pr103181.c: New testcase. * gcc.dg/pr103248.c: Likewise. (cherry picked from commit 2f0c8f74daef93c0c7b33294213e7db6df58c4d1)
[Bug middle-end/103248] [12 Regression] ICE in operation_could_trap_helper_p, at tree-eh.c:2479
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103248 --- Comment #15 from CVS Commits --- The releases/gcc-10 branch has been updated by Richard Biener : https://gcc.gnu.org/g:5f5c26a2f02572996efd2b2de0dd5600ad7e91e7 commit r10-10464-g5f5c26a2f02572996efd2b2de0dd5600ad7e91e7 Author: Richard Biener Date: Thu Nov 11 09:40:36 2021 +0100 middle-end/103181 - fix operation_could_trap_p for vector division For integer vector division we only checked for all zero vector constants rather than checking whether any element in the constant vector is zero. It also fixes the adjustment to operation_could_trap_helper_p where I failed to realize that RDIV_EXPR is also used for fixed-point types. It also fixes that handling by properly checking for a fixed_zerop divisor. 2021-11-11 Richard Biener PR middle-end/103181 PR middle-end/103248 * tree-eh.c (operation_could_trap_helper_p): Properly check vector constants for a zero element for integer division. Separate floating point and integer division code. Properly handle fixed-point RDIV_EXPR. * gcc.dg/torture/pr103181.c: New testcase. * gcc.dg/pr103248.c: Likewise. (cherry picked from commit 2f0c8f74daef93c0c7b33294213e7db6df58c4d1)
[Bug tree-optimization/103237] [9/10 Regression] wrong code with -ftree-vectorize at -O1 on x86_64-linux-gnu starting with r7-1219-gb28ead45fe630b9e
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103237 --- Comment #10 from CVS Commits --- The releases/gcc-10 branch has been updated by Richard Biener : https://gcc.gnu.org/g:c4015dab1a4697177f5801c8149f7ce15eeeb9e1 commit r10-10465-gc4015dab1a4697177f5801c8149f7ce15eeeb9e1 Author: Richard Biener Date: Mon Nov 15 11:37:56 2021 +0100 tree-optimization/103237 - avoid vectorizing unhandled double reductions Double reductions which have multiple LC PHIs in the inner loop are not handled correctly during transformation since those PHIs are not properly classified as reduction. The following disables vectorizing them. 2021-11-15 Richard Biener PR tree-optimization/103237 * tree-vect-loop.c (vect_is_simple_reduction): Fail for double reductions with multiple inner loop LC PHI nodes. * gcc.dg/torture/pr103237.c: New testcase. (cherry picked from commit 220bd61874cf114667b44f9ded76ed0639eb278b)
[Bug libstdc++/104559] vector v; v.insert(v.begin()); compiles, but it shouldn't
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104559 --- Comment #4 from Jonathan Wakely --- Yep, that's why we have it, thanks. But it should have been excised years ago. I'll deprecate it, and kill it some time after GCC 12.
[Bug ipa/102762] [10 Regression] ICE with -O2: Segmentation fault, memcpy, copy_bb
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102762 Richard Biener changed: What|Removed |Added Status|ASSIGNED|RESOLVED Known to fail||10.3.1 Resolution|--- |FIXED --- Comment #7 from Richard Biener --- Fixed.
[Bug tree-optimization/101158] [10 Regression] ICE in gimple_call_arg, at gimple.h:3247
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101158 Richard Biener changed: What|Removed |Added Status|ASSIGNED|RESOLVED Known to work||10.3.1 Resolution|--- |FIXED --- Comment #6 from Richard Biener --- Fixed.
[Bug libstdc++/102358] niter_base and miter_base overloaded for move_iterator missing constexpr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102358 --- Comment #4 from Artur Bać --- In 12 ? In 11.2.1/include/g++-v11/bits/cpp_type_traits.h template _GLIBCXX20_CONSTEXPR inline _Iterator __miter_base(_Iterator __it) and as it was mentioned overload in stl_iterator.h has missing constexpr at all.
[Bug tree-optimization/104551] [12 Regression] Wrong code with -O3 for skylake-avx512, icelake-server, and sapphirerapids
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104551 --- Comment #5 from CVS Commits --- The master branch has been updated by hongtao Liu : https://gcc.gnu.org/g:754dce903ca28c4c2f2bc8614a8de5e631655f2e commit r12-7276-g754dce903ca28c4c2f2bc8614a8de5e631655f2e Author: liuhongt Date: Wed Feb 16 12:15:18 2022 +0800 Restrict the two sources of vect_recog_cond_expr_convert_pattern to be of the same type when convert is extension. It's not equal to transform (cond (cmp @1 @2) (convert@3 @4) (convert@5 @6)) to (convert (cmp @1 @2) (convert)@4 @6) when(convert@3 @4) is extension because it's zero_extend vs sign_extend. gcc/ChangeLog: PR tree-optimization/104551 PR tree-optimization/103771 * match.pd (cond_expr_convert_p): Add types_match check when convert is extension. * tree-vect-patterns.cc (gimple_cond_expr_convert_p): Adjust comments. (vect_recog_cond_expr_convert_pattern): Ditto. gcc/testsuite/ChangeLog: * gcc.target/i386/pr104551.c: New test.
[Bug target/103771] [12 Regression] Missed vectorization under -mavx512f -mavx512vl after r12-5489
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771 --- Comment #40 from CVS Commits --- The master branch has been updated by hongtao Liu : https://gcc.gnu.org/g:754dce903ca28c4c2f2bc8614a8de5e631655f2e commit r12-7276-g754dce903ca28c4c2f2bc8614a8de5e631655f2e Author: liuhongt Date: Wed Feb 16 12:15:18 2022 +0800 Restrict the two sources of vect_recog_cond_expr_convert_pattern to be of the same type when convert is extension. It's not equal to transform (cond (cmp @1 @2) (convert@3 @4) (convert@5 @6)) to (convert (cmp @1 @2) (convert)@4 @6) when(convert@3 @4) is extension because it's zero_extend vs sign_extend. gcc/ChangeLog: PR tree-optimization/104551 PR tree-optimization/103771 * match.pd (cond_expr_convert_p): Add types_match check when convert is extension. * tree-vect-patterns.cc (gimple_cond_expr_convert_p): Adjust comments. (vect_recog_cond_expr_convert_pattern): Ditto. gcc/testsuite/ChangeLog: * gcc.target/i386/pr104551.c: New test.
[Bug tree-optimization/104551] [12 Regression] Wrong code with -O3 for skylake-avx512, icelake-server, and sapphirerapids
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104551 --- Comment #6 from Hongtao.liu --- Fixed in GCC12.
[Bug tree-optimization/104579] vectorizer failed to reduce max & index search together
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104579 --- Comment #5 from Hongtao.liu --- PR50374? It's from Fotran minloc/maxloc intrinsics.
[Bug tree-optimization/45178] CDDCE doesn't eliminate conditional code in infinite loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45178 --- Comment #7 from CVS Commits --- The releases/gcc-11 branch has been updated by Richard Biener : https://gcc.gnu.org/g:634c2bc38ff66f13164967a8e3b965e8255dd4d9 commit r11-9586-g634c2bc38ff66f13164967a8e3b965e8255dd4d9 Author: Richard Biener Date: Fri Aug 27 09:47:49 2021 +0200 tree-optimization/45178 - DCE of dead control flow in infinite loop This fixes DCE to be able to elide dead control flow in an infinite loop without an exit edge. This special situation is handled well by the code finding an edge to preserve since there's no chance it will find the exit edge and make the loop finite. 2021-08-27 Richard Biener PR tree-optimization/45178 * tree-ssa-dce.c (find_obviously_necessary_stmts): For infinite loops without exit do not mark control dependent edges of the latch necessary. * gcc.dg/tree-ssa/ssa-dce-3.c: Adjust testcase. (cherry picked from commit 41439e1f6d2da1e86538c726f0603cffd5dd098e)
[Bug tree-optimization/102893] [9/10/11 Regression] CDDCE does not detect empty infinite nested loops
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102893 --- Comment #6 from CVS Commits --- The releases/gcc-11 branch has been updated by Richard Biener : https://gcc.gnu.org/g:6d9c2ed02128ddf327465333f5563500b6cf8886 commit r11-9587-g6d9c2ed02128ddf327465333f5563500b6cf8886 Author: Richard Biener Date: Fri Oct 22 12:45:32 2021 +0200 tree-optimization/102893 - properly DCE empty loops inside infinite loops The following fixes the test for an exit edge I put in place for the fix for PR45178 where I somehow misunderstood how the cyclic list works. 2021-10-22 Richard Biener PR tree-optimization/102893 * tree-ssa-dce.c (find_obviously_necessary_stmts): Fix the test for an exit edge. * gcc.dg/tree-ssa/ssa-dce-9.c: New testcase. (cherry picked from commit c2a9a98a369528c8689ecb68db576f8e7dc2fa45)
[Bug target/104581] New: Huge compile-time regression building SPEC 2017 538.imagick_r with PGO
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104581 Bug ID: 104581 Summary: Huge compile-time regression building SPEC 2017 538.imagick_r with PGO Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- Building magick/enhance.c with -Ofast -march=znver2 -fprofile-generate spends all compile time in mdreorg: machine dep reorg : 505.62 ( 93%) 0.03 ( 5%) 509.15 ( 92%) 193k ( 0%) TOTAL : 543.25 0.63551.52 236M https://lnt.opensuse.org/db_default/v4/SPEC/graph?highlight_run=23626&plot.507=14.507.8 shows similar behavior on Kabylake
[Bug target/104581] [12 Regression] Huge compile-time regression building SPEC 2017 538.imagick_r with PGO
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104581 Richard Biener changed: What|Removed |Added Target||x86_64-*-* i?86-*-* Target Milestone|--- |12.0 Keywords||compile-time-hog Summary|Huge compile-time |[12 Regression] Huge |regression building SPEC|compile-time regression |2017 538.imagick_r with PGO |building SPEC 2017 ||538.imagick_r with PGO
[Bug libstdc++/102358] niter_base and miter_base overloaded for move_iterator missing constexpr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102358 --- Comment #5 from Jonathan Wakely --- I don't understand what you're saying. __miter_base is not make_move_iterator, so what do you mean? std::make_move_iterator is constexpr for C++17 and up. That's true in GCC 12 and in every release since GCC 7.1 because I added it in commit r7-2774-g06db992005654e https://godbolt.org/z/W3qsnbvoE Do you have code using std::make_move_iterator that fails to compile with GCC 12? If so, please show that code instead of whatever it is you're saying about __miter_base and __niter_base, because those do not affect std::make_move_iterator in any way.
[Bug c/85487] Support '#pragma region' and '#pragma endregion' to allow code folding with Visual Studio
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85487 Eric Gallager changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=61593 CC||egallager at gcc dot gnu.org --- Comment #10 from Eric Gallager --- (In reply to Jonathan Wakely from comment #3) > The docs raise some questions. > > They say that a #pragma region must be ended by a #pragma endregion. Should > the compiler check that and issue a diagnostic otherwise? > > What is the form of the optional "name" that follows #pragma region? > > What if #pragma endregion is followed by preprocessor tokens, not just a > comment? > > If we don't care about validating anything, it's easy to make GCC completely > ignore those pragmas: > > --- a/gcc/c-family/c-pragma.cc > +++ b/gcc/c-family/c-pragma.cc > @@ -1218,6 +1218,15 @@ handle_pragma_message (cpp_reader *ARG_UNUSED(dummy)) > TREE_STRING_POINTER (message)); > } > > +/* Ignore a no-op pragma that GCC recognizes, but which has no effect. */ > +static void > +handle_pragma_ignore (cpp_reader *) > +{ > + tree x; > + while (pragma_lex (&x) != CPP_EOF) > +/* Ignore the rest of the line. */; > +} > + > /* Mark whether the current location is valid for a STDC pragma. */ > > static bool valid_location_for_stdc_pragma; > @@ -1633,6 +1642,9 @@ init_pragma (void) >c_register_pragma ("GCC", "pop_options", handle_pragma_pop_options); >c_register_pragma ("GCC", "reset_options", handle_pragma_reset_options); > > + c_register_pragma (0, "region", handle_pragma_ignore); > + c_register_pragma (0, "endregion", handle_pragma_ignore); > + >c_register_pragma ("STDC", "FLOAT_CONST_DECIMAL64", > handle_pragma_float_const_decimal64); > > > > This needs tests though. so, this seems relevant to bug 61593 too...
[Bug target/104581] [12 Regression] Huge compile-time regression building SPEC 2017 538.imagick_r with PGO
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104581 Richard Biener changed: What|Removed |Added Priority|P3 |P1 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed||2022-02-17 --- Comment #1 from Richard Biener --- Samples: 2M of event 'cycles', Event count (approx.): 2071823178483 Overhead Command Shared Object Symbol 92.82% cc1 cc1 [.] ix86_avx_u128_mode_need 0.70% cc1 cc1 [.] update_conflict_hard_re GCC 11 compiles this file in 36 seconds.
[Bug libstdc++/102358] niter_base and miter_base overloaded for move_iterator missing constexpr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102358 --- Comment #6 from Artur Bać --- My bad. copy itself is constexpr since c++20, I was misleaded by overload used for move_iterator with copy that has missing constexpr template auto __miter_base(move_iterator<_Iterator> __it)
[Bug target/104581] [12 Regression] Huge compile-time regression building SPEC 2017 538.imagick_r with PGO
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104581 --- Comment #2 from Richard Biener --- I suspect that FOR_EACH_SUBRTX (iter, array, src, NONCONST) if (ix86_check_avx_upper_register (*iter)) { int status = ix86_avx_u128_mode_source (insn, *iter); if (status == AVX_U128_DIRTY) return status; } and ix86_avx_u128_mode_source walking defs via DF and doing for each def /* Check if DEF_INSN is before INSN. */ rtx_insn *next; for (next = NEXT_INSN (def_insn); next != nullptr && next != end && next != insn; next = NEXT_INSN (next)) ; is ending up with quadraticness.
[Bug tree-optimization/103237] [9 Regression] wrong code with -ftree-vectorize at -O1 on x86_64-linux-gnu starting with r7-1219-gb28ead45fe630b9e
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103237 --- Comment #11 from CVS Commits --- The releases/gcc-9 branch has been updated by Richard Biener : https://gcc.gnu.org/g:68c80396906ab10051a69a2181e114c61dd4ee8a commit r9-9954-g68c80396906ab10051a69a2181e114c61dd4ee8a Author: Richard Biener Date: Mon Nov 15 11:37:56 2021 +0100 tree-optimization/103237 - avoid vectorizing unhandled double reductions Double reductions which have multiple LC PHIs in the inner loop are not handled correctly during transformation since those PHIs are not properly classified as reduction. The following disables vectorizing them. 2021-11-15 Richard Biener PR tree-optimization/103237 * tree-vect-loop.c (vect_is_simple_reduction): Fail for double reductions with multiple inner loop LC PHI nodes. * gcc.dg/torture/pr103237.c: New testcase. (cherry picked from commit 220bd61874cf114667b44f9ded76ed0639eb278b)
[Bug tree-optimization/103181] [9 Regression] wrong code at -O1 due to conditional division by 0 being executed
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103181 --- Comment #9 from CVS Commits --- The releases/gcc-9 branch has been updated by Richard Biener : https://gcc.gnu.org/g:1ac5fbea476e4ebd6a0086ccfbf92e648768be7b commit r9-9955-g1ac5fbea476e4ebd6a0086ccfbf92e648768be7b Author: Richard Biener Date: Thu Nov 11 09:40:36 2021 +0100 middle-end/103181 - fix operation_could_trap_p for vector division For integer vector division we only checked for all zero vector constants rather than checking whether any element in the constant vector is zero. It also fixes the adjustment to operation_could_trap_helper_p where I failed to realize that RDIV_EXPR is also used for fixed-point types. It also fixes that handling by properly checking for a fixed_zerop divisor. 2021-11-11 Richard Biener PR middle-end/103181 PR middle-end/103248 * tree-eh.c (operation_could_trap_helper_p): Properly check vector constants for a zero element for integer division. Separate floating point and integer division code. Properly handle fixed-point RDIV_EXPR. * gcc.dg/torture/pr103181.c: New testcase. * gcc.dg/pr103248.c: Likewise. (cherry picked from commit 2f0c8f74daef93c0c7b33294213e7db6df58c4d1)
[Bug middle-end/103248] [12 Regression] ICE in operation_could_trap_helper_p, at tree-eh.c:2479
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103248 --- Comment #16 from CVS Commits --- The releases/gcc-9 branch has been updated by Richard Biener : https://gcc.gnu.org/g:1ac5fbea476e4ebd6a0086ccfbf92e648768be7b commit r9-9955-g1ac5fbea476e4ebd6a0086ccfbf92e648768be7b Author: Richard Biener Date: Thu Nov 11 09:40:36 2021 +0100 middle-end/103181 - fix operation_could_trap_p for vector division For integer vector division we only checked for all zero vector constants rather than checking whether any element in the constant vector is zero. It also fixes the adjustment to operation_could_trap_helper_p where I failed to realize that RDIV_EXPR is also used for fixed-point types. It also fixes that handling by properly checking for a fixed_zerop divisor. 2021-11-11 Richard Biener PR middle-end/103181 PR middle-end/103248 * tree-eh.c (operation_could_trap_helper_p): Properly check vector constants for a zero element for integer division. Separate floating point and integer division code. Properly handle fixed-point RDIV_EXPR. * gcc.dg/torture/pr103181.c: New testcase. * gcc.dg/pr103248.c: Likewise. (cherry picked from commit 2f0c8f74daef93c0c7b33294213e7db6df58c4d1)
[Bug tree-optimization/102798] [9 Regression] wrong code with -O3 -fno-tree-pta by r9-2475
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102798 --- Comment #15 from CVS Commits --- The releases/gcc-9 branch has been updated by Richard Biener : https://gcc.gnu.org/g:523f5950c70d65714bedf9d5fe164d9e6d69dd87 commit r9-9956-g523f5950c70d65714bedf9d5fe164d9e6d69dd87 Author: Richard Biener Date: Mon Oct 18 09:10:43 2021 +0200 tree-optimization/102798 - avoid copying PTA info to old SSA names The vectorizer duplicates pointer-info to created pointer bases but it has to avoid changing points-to info on existing SSA names because there's now flow-sensitive info in there (pt->pt_null as set from VRP). 2021-10-18 Richard Biener PR tree-optimization/102798 * tree-vect-data-refs.c (vect_create_addr_base_for_vector_ref): Only copy points-to info to newly generated SSA names. * gcc.dg/pr102798.c: New testcase. (cherry picked from commit 1631d6d2910e03e4517079d6e6ad0ae1aeb24dfa)
[Bug tree-optimization/103237] [9 Regression] wrong code with -ftree-vectorize at -O1 on x86_64-linux-gnu starting with r7-1219-gb28ead45fe630b9e
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103237 Richard Biener changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED Known to work||10.3.1 --- Comment #12 from Richard Biener --- Fixed.
[Bug tree-optimization/103181] [9 Regression] wrong code at -O1 due to conditional division by 0 being executed
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103181 Richard Biener changed: What|Removed |Added Known to fail|10.3.1 |10.3.0 Resolution|--- |FIXED Known to work||10.3.1 Status|ASSIGNED|RESOLVED --- Comment #10 from Richard Biener --- Fixed.
[Bug tree-optimization/102798] [9 Regression] wrong code with -O3 -fno-tree-pta by r9-2475
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102798 Richard Biener changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #16 from Richard Biener --- Fixed.
[Bug target/104582] New: Unoptimal code for __negdi2 (and others) from libgcc2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104582 Bug ID: 104582 Summary: Unoptimal code for __negdi2 (and others) from libgcc2 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: ubizjak at gmail dot com Target Milestone: --- Following testcase (taken from libgcc): --cut here-- typedef int DItype __attribute__ ((mode (DI))); typedef unsigned int UDItype__attribute__ ((mode (DI))); typedef int TItype __attribute__ ((mode (TI))); #define Wtype DItype #define UWtype UDItype #define DWtype TItype #if __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__ struct DWstruct {Wtype high, low;}; #else struct DWstruct {Wtype low, high;}; #endif typedef union { struct DWstruct s; DWtype ll; } DWunion; DWtype __negdi2 (DWtype u) { const DWunion uu = {.ll = u}; const DWunion w = { {.low = -uu.s.low, .high = -uu.s.high - ((UWtype) -uu.s.low > 0) } }; return w.ll; } --cut here-- compiles with -O2 on x86_64 to: __negdi2: movq%rdi, %rax negq%rsi negq%rax cmpq$1, %rdi adcq$-1, %rsi movq%rax, %xmm0 movq%rsi, %xmm1 punpcklqdq %xmm1, %xmm0 movaps %xmm0, -24(%rsp) movq-24(%rsp), %rax movq-16(%rsp), %rdx ret Please note the convoluted sequence to move the value at the end. gcc-10 compiles the code to: __negdi2: negq%rsi movq%rdi, %rax negq%rax movq%rsi, %rdx cmpq$1, %rdi adcq$-1, %rdx ret
[Bug target/104581] [12 Regression] Huge compile-time regression building SPEC 2017 538.imagick_r with PGO
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104581 --- Comment #3 from Richard Biener --- Since targetm.mode_switching.needed is called as part of the mode-switching dataflow problem I don't see how looking at reg refs should be needed at all. What might be needed and what I'm not sure is available, is the mode-switching state of uses. The relevant call is FOR_BB_INSNS (bb, insn) { if (INSN_P (insn)) { int mode = targetm.mode_switching.needed (e, insn); and indeed all the time is spent in /* Check if DEF_INSN is before INSN. */ rtx_insn *next; for (next = NEXT_INSN (def_insn); next != nullptr && next != end && next != insn; next = NEXT_INSN (next)) ;
[Bug tree-optimization/104582] Unoptimal code for __negdi2 (and others) from libgcc2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104582 Uroš Bizjak changed: What|Removed |Added Component|target |tree-optimization --- Comment #1 from Uroš Bizjak --- Happens due to unwanted vectorization with -ftree-vectorize by default.
[Bug libstdc++/102358] niter_base and miter_base overloaded for move_iterator missing constexpr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102358 Jonathan Wakely changed: What|Removed |Added Target Milestone|--- |10.4 --- Comment #7 from Jonathan Wakely --- OK, thanks for clarifying. Patrick, please backport this to gcc-10 and gcc-11 at some point.
[Bug debug/104549] Missing variable at O2/O3 likely caused by -fearly-inlining
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104549 --- Comment #3 from Cristian Assaiante --- I have tested multiple older gcc versions (4.3, 7.5, 9.4, 11.2) and apparently the variable is visible in 4.3 and 7.5. The asm for the main function of the binary from gcc7.5: main: .LFB1: # a.c:9 .loc 1 9 0 .cfi_startproc # BLOCK 2 freq:1 seq:0 # PRED: ENTRY [100.0%] (FALLTHRU) .LVL2: subq$8, %rsp .cfi_def_cfa_offset 16 .LBB4: .LBB5: # a.c:5 .loc 1 5 0 xorl%edi, %edi xorl%eax, %eax calltest@PLT .LVL3: .LBE5: .LBE4: # a.c:11 .loc 1 11 0 xorl%eax, %eax addq$8, %rsp .cfi_def_cfa_offset 8 # SUCC: EXIT [100.0%] ret Differently from more recent versions, the inlined a is in the LBB5...LBE5 range only. So there is no empty range associated to it and the debug info in correctly visualized in gdb.
[Bug tree-optimization/103856] ICE during GIMPLE pass: hardcmp since r12-4759-g95bb87b2458bfab4 and -fnon-call-exceptions -fsignaling-nans
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103856 Alexandre Oliva changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |aoliva at gcc dot gnu.org Status|NEW |ASSIGNED --- Comment #3 from Alexandre Oliva --- Mine
[Bug target/104581] [12 Regression] Huge compile-time regression building SPEC 2017 538.imagick_r with PGO
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104581 Richard Biener changed: What|Removed |Added Status|NEW |ASSIGNED CC||hjl.tools at gmail dot com Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #4 from Richard Biener --- For just the special-case of AVX loads from constant zero this is a quite expensive thing to do. diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc index cf246e74e57..e4b42fbba6f 100644 --- a/gcc/config/i386/i386.cc +++ b/gcc/config/i386/i386.cc @@ -14520,11 +14452,7 @@ ix86_avx_u128_mode_needed (rtx_insn *insn) { FOR_EACH_SUBRTX (iter, array, src, NONCONST) if (ix86_check_avx_upper_register (*iter)) - { - int status = ix86_avx_u128_mode_source (insn, *iter); - if (status == AVX_U128_DIRTY) - return status; - } + return AVX_U128_DIRTY; } /* This isn't YMM/ZMM load/store. */ fixes this and makes the compile finish in 16s.
[Bug tree-optimization/103856] ICE during GIMPLE pass: hardcmp since r12-4759-g95bb87b2458bfab4 and -fnon-call-exceptions -fsignaling-nans
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103856 --- Comment #4 from Alexandre Oliva --- Created attachment 52458 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52458&action=edit candidate patch under test Here's a proposed fix
[Bug tree-optimization/104582] Unoptimal code for __negdi2 (and others) from libgcc2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104582 --- Comment #2 from Uroš Bizjak --- Please note that gcc-10 does not vectorize the testcase even with -O3 -ftree-vectorize.
[Bug target/104581] [12 Regression] Huge compile-time regression building SPEC 2017 538.imagick_r with PGO
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104581 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #5 from Jakub Jelinek --- Therefore regressed with r12-7125-g5390a2f191682dae3c6d1e1deac20e05be413514
[Bug target/104581] [12 Regression] Huge compile-time regression building SPEC 2017 538.imagick_r with PGO
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104581 --- Comment #6 from Richard Biener --- (In reply to Jakub Jelinek from comment #5) > Therefore regressed with r12-7125-g5390a2f191682dae3c6d1e1deac20e05be413514 The insn walk was there before btw (the first jump in the LNT graph). This just made it even worse. The walk was introduced with r12-2571-g9775e465c1fbfc32656de77c618c61acf5bd905d
[Bug tree-optimization/103845] ICE in execute, at gimple-harden-conditionals.cc:552 -fharden-compares -fno-ipa-pure-const and returns_twice
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103845 Alexandre Oliva changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |aoliva at gcc dot gnu.org --- Comment #2 from Alexandre Oliva --- Mine. I can't duplicate this with a current compiler.
[Bug middle-end/104540] ICE: SIGSEGV in cfi_oprnd_equal_p with -O2 -fharden-conditional-branches -mforce-drap -mstackrealign --param=max-grow-copy-bb-insns=125
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104540 Alexandre Oliva changed: What|Removed |Added Last reconfirmed||2022-02-17 Assignee|unassigned at gcc dot gnu.org |aoliva at gcc dot gnu.org Ever confirmed|0 |1 Status|UNCONFIRMED |ASSIGNED --- Comment #1 from Alexandre Oliva --- Mine. Confirmed.
[Bug libstdc++/102358] niter_base and miter_base overloaded for move_iterator missing constexpr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102358 --- Comment #8 from CVS Commits --- The releases/gcc-11 branch has been updated by Patrick Palka : https://gcc.gnu.org/g:973e0bc1542dd5efc501fef8653d47c9b00adf97 commit r11-9588-g973e0bc1542dd5efc501fef8653d47c9b00adf97 Author: Patrick Palka Date: Thu Oct 21 12:13:35 2021 -0400 libstdc++: missing constexpr for __[nm]iter_base [PR102358] PR libstdc++/102358 libstdc++-v3/ChangeLog: * include/bits/stl_iterator.h (__niter_base): Make constexpr for C++20. (__miter_base): Likewise. * testsuite/25_algorithms/move/constexpr.cc: New test. (cherry picked from commit 5f7976f65b45c457b57bfc2c55ec845771e0d3c2)
[Bug target/104581] [12 Regression] Huge compile-time regression building SPEC 2017 538.imagick_r with PGO
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104581 --- Comment #7 from Jakub Jelinek --- Ah, you're right. So, can't it instead of the quadratic walk just compare DF_INSN_LUID? If it isn't right after df_analyze and some insns could have been added in between, it would need to maintain the luids somehow (perhaps e.g. in the way how we do it in tree-ssa-reassoc.cc, if we add insns, we must set their uid to either the previous or next insn's uid and then can do some IL walk, but only as long as the uid is the same, so unless everything in the bb changes it should be still cheap.
[Bug target/104581] [12 Regression] Huge compile-time regression building SPEC 2017 538.imagick_r with PGO
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104581 --- Comment #8 from Jakub Jelinek --- Or if we have in df some way how to determine which insns have been added, just ignore those and look for their last predecessor or first successor that isn't dirty/without df computed.
[Bug libstdc++/102358] niter_base and miter_base overloaded for move_iterator missing constexpr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102358 --- Comment #9 from CVS Commits --- The releases/gcc-10 branch has been updated by Patrick Palka : https://gcc.gnu.org/g:f9982b5a81a151663c76ba0a3fb6df674f29ba4b commit r10-10466-gf9982b5a81a151663c76ba0a3fb6df674f29ba4b Author: Patrick Palka Date: Thu Oct 21 12:13:35 2021 -0400 libstdc++: missing constexpr for __[nm]iter_base [PR102358] PR libstdc++/102358 libstdc++-v3/ChangeLog: * include/bits/stl_iterator.h (__niter_base): Make constexpr for C++20. (__miter_base): Likewise. * testsuite/25_algorithms/move/constexpr.cc: New test. (cherry picked from commit 5f7976f65b45c457b57bfc2c55ec845771e0d3c2)
[Bug libstdc++/102358] niter_base and miter_base overloaded for move_iterator missing constexpr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102358 Patrick Palka changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #10 from Patrick Palka --- Fixed for 10.4/11.3/12.
[Bug tree-optimization/103845] ICE in execute, at gimple-harden-conditionals.cc:552 -fharden-compares -fno-ipa-pure-const and returns_twice
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103845 --- Comment #3 from Arseny Solokha --- I cannot reproduce it w/ the latest weekly snapshot as well.
[Bug bootstrap/104566] Internal compiler error in fail_formatted while building gcc from source while building GCC 11.2.0 with ubuntu's 7.5.0-3ubuntu1~18.04
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104566 --- Comment #2 from Xander L --- Hey, After trying the same thing on a different workstation it did work. I'm not sure if it was just that workstation or some temporary error. Should I close this as 'fixed' or 'worksforme' or leave this open? I don't think I changed that would explain this change in behaviour, I'm still on the same user account & same everything, just different hardware. Anyway, the output of `env` is the following: ``` CLUTTER_IM_MODULE=xim CONDA_SHLVL=1 NVM_DIR=/vol/home/s1935534/.nvm LD_LIBRARY_PATH=:/vol/home/s1935534/usr/lib LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36: CONDA_EXE=/vol/home/s1935534/anaconda3/bin/conda LESSCLOSE=/usr/bin/lesspipe %s %s XDG_MENU_PREFIX=gnome- LANG=en_US.UTF-8 DISPLAY=:0 GNOME_SHELL_SESSION_MODE=ubuntu C_INCLUDE_PATH=:/vol/home/s1935534/usr/include EDITOR=nano COLORTERM=truecolor NVM_CD_FLAGS= USERNAME=s1935534 CONDA_PREFIX=/vol/home/s1935534/anaconda3 XDG_VTNR=2 SSH_AUTH_SOCK=/run/user/1224490/keyring/ssh MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path S_COLORS=auto _CE_M= XDG_SESSION_ID=1036 USER=s1935534 DESKTOP_SESSION=ubuntu QT4_IM_MODULE=xim TEXTDOMAINDIR=/usr/share/locale/ GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/907d52d2_ba31_4cee_a5f7_4e96391158fd DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path PWD=/vol/home/s1935534 HOME=/vol/home/s1935534 CONDA_PYTHON_EXE=/vol/home/s1935534/anaconda3/bin/python TEXTDOMAIN=im-config SSH_AGENT_PID=1182 QT_ACCESSIBILITY=1 XDG_SESSION_TYPE=x11 KRB5CCNAME=FILE:/tmp/krb5cc_1224490 XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop _CE_CONDA= XDG_SESSION_DESKTOP=ubuntu GJS_DEBUG_OUTPUT=stderr CONDA_PROMPT_MODIFIER=(base) GTK_MODULES=gail:atk-bridge WINDOWPATH=2 TERM=xterm-256color SHELL=/bin/bash VTE_VERSION=5202 QT_IM_MODULE=ibus XMODIFIERS=@im=ibus IM_CONFIG_PHASE=2 NVM_BIN=/vol/home/s1935534/.nvm/versions/node/v14.11.0/bin XDG_CURRENT_DESKTOP=ubuntu:GNOME GPG_AGENT_INFO=/run/user/1224490/gnupg/S.gpg-agent:0:1 GNOME_TERMINAL_SERVICE=:1.81 XDG_SEAT=seat0 SHLVL=1 LANGUAGE=en_US: GDMSESSION=ubuntu GNOME_DESKTOP_SESSION_ID=this-is-deprecated LOGNAME=s1935534 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1224490/bus XDG_RUNTIME_DIR=/run/user/1224490 XAUTHORITY=/run/user/1224490/gdm/Xauthority CPLUS_INCLUDE_PATH=:/vol/home/s1935534/usr/include XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg PATH=/vol/home/s1935534/.nvm/versions/node/v14.11.0/bin:/vol/home/s1935534/anaconda3/bin:/vol/home/s1935534/anaconda3/condabin:/vol/share/software/Xilinx/14.7/ISE_DS:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/vol/home/s1935534/usr/bin:/vol/home/s1935534/Documents/Programms/kotlin-native-linux-x86_64-1.5.30 CONDA_DEFAULT_ENV=base NVM_INC=/vol/home/s1935534/.nvm/versions/node/v14.11.0/include/node GJS_DEBUG_TOPICS=JS ERROR;JS LOG SESSION_MANAGER=local/u0030322.vuw.leidenuniv.nl:@/tmp/.ICE-unix/1091,unix/u0030322.vuw.leidenuniv.nl:/tmp/.ICE-unix/1091 LESSOPEN=| /usr/bin/lesspipe %s GTK_IM_MODULE=ibus LC_TIME=en_GB.utf8 _=/usr/bin/env ```
[Bug target/104581] [12 Regression] Huge compile-time regression building SPEC 2017 538.imagick_r with PGO
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104581 --- Comment #9 from rguenther at suse dot de --- On Thu, 17 Feb 2022, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104581 > > --- Comment #7 from Jakub Jelinek --- > Ah, you're right. > So, can't it instead of the quadratic walk just compare DF_INSN_LUID? > If it isn't right after df_analyze and some insns could have been added in > between, it would need to maintain the luids somehow (perhaps e.g. in the way > how we do it in tree-ssa-reassoc.cc, if we add insns, we must set their uid to > either the previous or next insn's uid and then can do some IL walk, but only > as long as the uid is the same, so unless everything in the bb changes it > should be still cheap. I think this "feature" needs to be better integrated with the mode-switching data-flow. It's too much bolted-on and thus has unnecessarily high complexity. In particular this is the initial local analysis run of mode-switching where it just computes mode_in/mode_out of a BB (but the target hooks do not have the pass meta data available). The first calls to the hook are from if (targetm.mode_switching.entry && targetm.mode_switching.exit) { /* Split the edge from the entry block, so that we can note that there NORMAL_MODE is supplied. */ post_entry = split_edge (single_succ_edge (ENTRY_BLOCK_PTR_FOR_FN (cfun))); pre_exit = create_pre_exit (n_entities, entity_map, num_modes); which even runs before df_analyze () so if the DF walk would be triggered there it definitely looks bogus. I also see nothing adding the chain problem (I dn't remember which ones are added by default though).
[Bug analyzer/104576] False positive from -Wanalyzer-use-of-uninitialized-value from PR 63311
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104576 David Malcolm changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #3 from David Malcolm --- Should be fixed by the above patch. (In reply to David Malcolm from comment #1) > Potentially just a dup of PR analyzer/104434, but there might be additional > issues with the reproducer. Not quite: this one covers "const" functions not having side-effects, whereas PR analyzer/104434 concerns the return values of const/pure functions.
[Bug c++/104565] [10/11/12 Regression] constexpr template goes wrong with class and call to constexpr method
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104565 --- Comment #4 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:6bbd8afee0036c274f5ebb5b48d6fdc2091bd046 commit r12-7277-g6bbd8afee0036c274f5ebb5b48d6fdc2091bd046 Author: Patrick Palka Date: Thu Feb 17 08:35:23 2022 -0500 c++: double non-dep folding from finish_compound_literal [PR104565] In finish_compound_literal, we perform non-dependent expr folding before the call to check_narrowing ever since r9-5973. But ever since r10-7096, check_narrowing also performs non-dependent expr folding of its own. This double folding means tsubst will see non-templated trees during the second folding, which causes a spurious error in the below testcase. This patch removes the former folding operation; it seems obviated by the latter one. PR c++/104565 gcc/cp/ChangeLog: * semantics.cc (finish_compound_literal): Don't perform non-dependent expr folding before calling check_narrowing. gcc/testsuite/ChangeLog: * g++.dg/template/non-dependent22.C: New test.
[Bug c++/104565] [10/11 Regression] constexpr template goes wrong with class and call to constexpr method
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104565 Patrick Palka changed: What|Removed |Added Summary|[10/11/12 Regression] |[10/11 Regression] |constexpr template goes |constexpr template goes |wrong with class and call |wrong with class and call |to constexpr method |to constexpr method --- Comment #5 from Patrick Palka --- Fixed for GCC 12 so far.
[Bug middle-end/104540] ICE: SIGSEGV in cfi_oprnd_equal_p with -O2 -fharden-conditional-branches -mforce-drap -mstackrealign --param=max-grow-copy-bb-insns=125
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104540 --- Comment #2 from Alexandre Oliva --- Created attachment 52459 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52459&action=edit candidate patch under test Here's a candidate fix
[Bug target/103628] ICE: Segmentation fault (in gfc_conv_tree_to_mpfr)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103628 --- Comment #3 from seurer at gcc dot gnu.org --- There isn't a check_mod.f90 but there is a check_mod.F90 (Linux is case sensitive) and using that I was able to reproduce.
[Bug debug/104549] Missing variable at O2/O3 likely caused by -fearly-inlining
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104549 --- Comment #4 from Cristian Assaiante --- We have tested also multiple versions of gdb. With versions 9.2 and 11.2 we have the same behavior: variable i is visible for gcc4 and gcc7 and not visible for more recent gcc versions. With version 10.2 we have that variable i is marked as optimized out for gcc4 and gcc7 and not visible for more recent gcc versions.
[Bug target/84201] 549.fotonik3d_r from SPEC2017 fails verification with recent Intel and AMD CPUs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84201 --- Comment #13 from Richard Biener --- One option is to introduce a less invasive optimization option to avoid the undesirable vectorization. For example -fno-vectorize-fp-inductions noting this particular loop is a floating-point induction. Usually those tend not to be performance critical. More general -f[no-]vectorize-{in,re}ductions[={fp,int}] would be possible as well.
[Bug c++/94944] compile error accessing member function of dependent base class template in noexcept specification
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94944 Patrick Palka changed: What|Removed |Added Status|NEW |ASSIGNED CC||ppalka at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org
[Bug c++/99936] [modules] FAIL: g++.dg/modules/xtreme-header* on Darwin
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99936 Dominique d'Humieres changed: What|Removed |Added Resolution|--- |FIXED Status|WAITING |RESOLVED --- Comment #10 from Dominique d'Humieres --- I am closing the PR as FIXED. If there is any objection, please reopen it.
[Bug c++/99227] [meta] [modules] Bugs relating to header-units of STL header files
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99227 Bug 99227 depends on bug 99936, which changed state. Bug 99936 Summary: [modules] FAIL: g++.dg/modules/xtreme-header* on Darwin https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99936 What|Removed |Added Status|WAITING |RESOLVED Resolution|--- |FIXED
[Bug c++/103524] [meta-bug] modules issue
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103524 Bug 103524 depends on bug 99936, which changed state. Bug 99936 Summary: [modules] FAIL: g++.dg/modules/xtreme-header* on Darwin https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99936 What|Removed |Added Status|WAITING |RESOLVED Resolution|--- |FIXED
[Bug c++/104568] [10/11/12 Regression] ICE [c++20] caused by option "-std=c++20 -Wall" when operand of operator new has size equal to 0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104568 Jakub Jelinek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org --- Comment #5 from Jakub Jelinek --- Created attachment 52460 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52460&action=edit gcc12-pr104568.patch Untested fix.
[Bug ipa/102513] [10/11/12 Regression] Many false positive warnings with recursive function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102513 --- Comment #11 from Martin Jambor --- I am very well aware that my patch was just a mitigation, not something that would avoid the problem under all circumstances. We can attempt to look at array access indices during the summary creation phase and save constraints on parameters in order to not create the clones. But even then, inlining and late optimizations can expose such invalid array accesses in the clones that we still create and that are practically impossible to know about at IPA-CP time. It would be great if we finally invented a way to communicate to users that a warning comes from a function specialized for a given context or inlined at a particular point. Then the user would see that compiler created some dead code and might think it is stupid, but would at least know what is going on (see PR 102061 and the discussion in PR 60761). Limiting cloning if we know from VR that we should, like my patch does, is still a good thing to do, I think.
[Bug tree-optimization/104582] [11/12 Regression] Unoptimal code for __negdi2 (and others) from libgcc2 due to unwanted vectorization
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104582 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org Summary|Unoptimal code for __negdi2 |[11/12 Regression] |(and others) from libgcc2 |Unoptimal code for __negdi2 |due to unwanted |(and others) from libgcc2 |vectorization |due to unwanted ||vectorization Priority|P3 |P2 Target Milestone|--- |11.3 --- Comment #3 from Jakub Jelinek --- With -O3 started with r11-3204-gc9de716a59c873859df3b3e1fbb993200fce5a73 With -O2 most likely with r12-4240-g2b8453c401b699ed93c085d0413ab4b5030bcdb8 Not sure if it is better not to vectorize it or be able to undo the vectorization. In particular in this case, *.optimized dump has: _14 = {_1, _5}; _8 = VIEW_CONVERT_EXPR<__int128>(_14); where vector(2) long int _14; I guess it depends on how _8 is then used, if it is going to be used in some vector context, perhaps the above can be a win, but when the __int128 is returned as __int128, on targets that return in a pair of registers that is never beneficial, I bet if it is stored into memory, it will be hardly ever beneficial etc.
[Bug tree-optimization/103845] ICE in execute, at gimple-harden-conditionals.cc:552 -fharden-compares -fno-ipa-pure-const and returns_twice
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103845 Alexandre Oliva changed: What|Removed |Added Depends on||104263 --- Comment #4 from Alexandre Oliva --- I'm pretty sure it was the patch for bug 104263 that fixed it. Confirming... Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104263 [Bug 104263] [10/11 Regression] '-fcompare-debug' failure (length) w/ -O2 -fnon-call-exceptions -fno-inline-small-functions since r10-3575-g629387a6586a7531
[Bug target/84201] 549.fotonik3d_r from SPEC2017 fails verification with recent Intel and AMD CPUs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84201 --- Comment #14 from Martin Jambor --- (In reply to Richard Biener from comment #13) > One option is to introduce a less invasive optimization option[...] I think that would be useful, yes. It could even be a param if we do not want to commit to having it forever.
[Bug sanitizer/102656] [11/12 Regression] ICE on coroutines on -fsanitize=address -O1 since r11-1613-g788b962aa00959e8
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102656 Jakub Jelinek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org --- Comment #4 from Jakub Jelinek --- Created attachment 52461 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52461&action=edit gcc12-pr102656.patch Untested fix.
[Bug go/100537] [12 Regression] Bootstrap-O3 and bootstrap-debug fail on 32-bit ARM after gcc-12-657-ga076632e274a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100537 --- Comment #20 from Ian Lance Taylor --- There's no perfect way to handle the MERGE file on the release branches. What I usually do is to resolve the patch by replacing the existing revision number with the new one. Thanks.
[Bug tree-optimization/104582] [11/12 Regression] Unoptimal code for __negdi2 (and others) from libgcc2 due to unwanted vectorization
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104582 --- Comment #4 from Jakub Jelinek --- What slp does is just - w.s.low = _1; - w.s.high = _5; + _14 = {_1, _5}; + MEM[(union *)&w] = _14; I must say I don't really see that as a beneficial optimization, construction of a vector from scalars just to store it in memory doesn't look ever like a win.
[Bug tree-optimization/104582] [11/12 Regression] Unoptimal code for __negdi2 (and others) from libgcc2 due to unwanted vectorization
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104582 --- Comment #5 from Jakub Jelinek --- The costs look weird: _1 1 times scalar_store costs 12 in body _5 1 times scalar_store costs 12 in body _1 1 times vector_store costs 12 in body 1 times vec_construct costs 8 in prologue vec_construct is certainly more expensive than a store (especially in this case when it is a store into a TImode variable which isn't addressable and will not be in memory at all).
[Bug tree-optimization/103845] ICE in execute, at gimple-harden-conditionals.cc:552 -fharden-compares -fno-ipa-pure-const and returns_twice
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103845 --- Comment #5 from Alexandre Oliva --- Confirmed. The first patch there. I will still prepare a patch with the testcase to avoid an independent regression.