[Bug fortran/97123] New: double free detected in tcache 2 with recursive allocatable type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97123 Bug ID: 97123 Summary: double free detected in tcache 2 with recursive allocatable type Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: igor.gayday at mu dot edu Target Milestone: --- Consider the following program: program test_prg implicit none type :: recursive_block type(recursive_block), allocatable :: subblocks(:, :) end type type(recursive_block) :: top_level top_level = init_recursive() deallocate(top_level % subblocks) contains function init_recursive() result(res) type(recursive_block) :: res type(recursive_block), allocatable :: inner(:, :) allocate(inner(1, 1)) allocate(inner(1, 1) % subblocks(1, 1)) res % subblocks = inner end function end program Compiled with gfortran 10.2, it crashes at runtime on deallocate(top_level % subblocks) with the following message: free(): double free detected in tcache 2
[Bug libstdc++/97120] circular concept loops in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97120 --- Comment #2 from Avi Kivity --- This makes sense, according to my very limited ability to understand the standard. I reflected it to the clang bug here: https://bugs.llvm.org/show_bug.cgi?id=47509.
[Bug fortran/97122] Spurious FINAL ... must be in the specification part of a MODULE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97122 kargl at gcc dot gnu.org changed: What|Removed |Added Last reconfirmed||2020-09-20 Ever confirmed|0 |1 CC||kargl at gcc dot gnu.org Priority|P3 |P4 Status|UNCONFIRMED |NEW --- Comment #1 from kargl at gcc dot gnu.org --- This allows your code to compile. Index: gcc/fortran/decl.c === --- gcc/fortran/decl.c (revision 280157) +++ gcc/fortran/decl.c (working copy) @@ -11395,8 +11395,9 @@ gfc_match_final_decl (void) block = gfc_state_stack->previous->sym; gcc_assert (block); - if (!gfc_state_stack->previous || !gfc_state_stack->previous->previous - || gfc_state_stack->previous->previous->state != COMP_MODULE) + if (!gfc_state_stack->previous->previous + && gfc_state_stack->previous->previous->state != COMP_MODULE + && gfc_state_stack->previous->previous->state != COMP_SUBMODULE) { gfc_error ("Derived type declaration with FINAL at %C must be in the" " specification part of a MODULE"); Alternatively, the if-block can likely be removed.
[Bug fortran/97122] New: Spurious FINAL ... must be in the specification part of a MODULE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97122 Bug ID: 97122 Summary: Spurious FINAL ... must be in the specification part of a MODULE Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: ian_harvey at bigpond dot com Target Milestone: --- When compiling the following, recent master (and 10.2.1) issues an error Error: Derived type declaration with FINAL at (1) must be in the specification part of a MODULE There is no such requirement in the language. MODULE m IMPLICIT NONE INTERFACE MODULE SUBROUTINE other IMPLICIT NONE END SUBROUTINE other END INTERFACE END MODULE m SUBMODULE (m) s IMPLICIT NONE TYPE :: t CONTAINS FINAL :: p END TYPE t CONTAINS SUBROUTINE p(arg) TYPE(t), INTENT(INOUT) :: arg END SUBROUTINE p MODULE SUBROUTINE other END SUBROUTINE other END SUBMODULE s ]$ gfortran -v -c 2020-09-20\ final.f90 Using built-in specs. COLLECT_GCC=gfortran Target: x86_64-pc-linux-gnu Configured with: .././src/configure --prefix=/home/MEGMS2/ian/usr/gcc-11.0.0 --enable-languages=c,c++,fortran,lto --enable-libgomp --enable-checking=release --disable-multilib Thread model: posix Supported LTO compression algorithms: zlib gcc version 11.0.0 20200919 (experimental) (GCC) COLLECT_GCC_OPTIONS='-v' '-c' '-mtune=generic' '-march=x86-64' /home/MEGMS2/ian/usr/gcc-11.0.0/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/f951 2020-09-20 final.f90 -quiet -dumpbase 2020-09-20 final.f90 -dumpbase-ext .f90 -mtune=generic -march=x86-64 -version -fintrinsic-modules-path /home/MEGMS2/ian/usr/gcc-11.0.0/lib/gcc/x86_64-pc-linux-gnu/11.0.0/finclude -fpre-include=/usr/include/finclude/math-vector-fortran.h -o /tmp/ccPu3yxp.s GNU Fortran (GCC) version 11.0.0 20200919 (experimental) (x86_64-pc-linux-gnu) compiled by GNU C version 11.0.0 20200919 (experimental), GMP version 6.1.2, MPFR version 4.0.2-p9, MPC version 1.1.0, isl version isl-0.16.1-GMP GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 GNU Fortran2008 (GCC) version 11.0.0 20200919 (experimental) (x86_64-pc-linux-gnu) compiled by GNU C version 11.0.0 20200919 (experimental), GMP version 6.1.2, MPFR version 4.0.2-p9, MPC version 1.1.0, isl version isl-0.16.1-GMP GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 2020-09-20 final.f90:14:10: 14 | FINAL :: p | 1 Error: Derived type declaration with FINAL at (1) must be in the specification part of a MODULE
[Bug tree-optimization/82608] missing -Warray-bounds on an out-of-bounds VLA index
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82608 --- Comment #7 from Martin Sebor --- Despite the enhancement the test case in comment #0 is still not diagnosed (the n argument has no range).
[Bug tree-optimization/56456] [meta-bug] bogus/missing -Warray-bounds
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56456 Bug 56456 depends on bug 84051, which changed state. Bug 84051 Summary: [7/8/9 Regression] missing -Warray-bounds on an out-of-bounds access via an array pointer https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84051 What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED
[Bug middle-end/84051] [7/8/9 Regression] missing -Warray-bounds on an out-of-bounds access via an array pointer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84051 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|RESOLVED Target Milestone|9.0 |11.0 Resolution|--- |FIXED --- Comment #7 from Martin Sebor --- GCC 11 issues the following warning for the test case in comment #0: $ gcc -O2 -S -Wall pr84851.c pr84851.c: In function ‘f’: pr84851.c:5:14: warning: array subscript 7 is above array bounds of ‘A4’ {aka ‘int[4]’} [-Warray-bounds] 5 | return (*p)[7]; | ^~~ pr84851.c:3:12: note: while referencing ‘p’ 3 | int f (A4 *p) |^
[Bug c/67793] Missing warning for C99 static array dimension mismatch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67793 Martin Sebor changed: What|Removed |Added Status|NEW |RESOLVED Target Milestone|--- |11.0 Resolution|--- |FIXED Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot gnu.org --- Comment #4 from Martin Sebor --- GCC 11 reports the following warning (with or without static): $ gcc -S pr67793.c pr67793.c: In function ‘main’: pr67793.c:6:16: warning: ‘func’ accessing 32 bytes in a region of size 8 [-Wstringop-overflow=] 6 | return func(p); |^~~ pr67793.c:6:16: note: referencing argument 1 of type ‘char *’
[Bug c/50584] No warning for passing small array to C99 static array declarator
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50584 Martin Sebor changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED Target Milestone|--- |11.0 --- Comment #20 from Martin Sebor --- Done for GCC 11.
[Bug c/67793] Missing warning for C99 static array dimension mismatch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67793 Bug 67793 depends on bug 50584, which changed state. Bug 50584 Summary: No warning for passing small array to C99 static array declarator https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50584 What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED
[Bug middle-end/94195] missing warning reading a smaller object via an lvalue of a larger type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94195 --- Comment #2 from CVS Commits --- The master branch has been updated by Martin Sebor : https://gcc.gnu.org/g:3f9a497d1b0dd9da87908a11b59bf364ad40ddca commit r11-3306-g3f9a497d1b0dd9da87908a11b59bf364ad40ddca Author: Martin Sebor Date: Sat Sep 19 17:47:29 2020 -0600 Extend -Warray-bounds to detect out-of-bounds accesses to array parameters. gcc/ChangeLog: PR middle-end/82608 PR middle-end/94195 PR c/50584 PR middle-end/84051 * gimple-array-bounds.cc (get_base_decl): New function. (get_ref_size): New function. (trailing_array): New function. (array_bounds_checker::check_array_ref): Call them. Handle arrays declared in function parameters. (array_bounds_checker::check_mem_ref): Same. Handle references to dynamically allocated arrays. gcc/testsuite/ChangeLog: PR middle-end/82608 PR middle-end/94195 PR c/50584 PR middle-end/84051 * c-c++-common/Warray-bounds.c: Adjust. * gcc.dg/Wbuiltin-declaration-mismatch-9.c: Adjust. * gcc.dg/Warray-bounds-63.c: New test. * gcc.dg/Warray-bounds-64.c: New test. * gcc.dg/Warray-bounds-65.c: New test. * gcc.dg/Warray-bounds-66.c: New test. * gcc.dg/Warray-bounds-67.c: New test.
[Bug tree-optimization/82608] missing -Warray-bounds on an out-of-bounds VLA index
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82608 --- Comment #6 from CVS Commits --- The master branch has been updated by Martin Sebor : https://gcc.gnu.org/g:3f9a497d1b0dd9da87908a11b59bf364ad40ddca commit r11-3306-g3f9a497d1b0dd9da87908a11b59bf364ad40ddca Author: Martin Sebor Date: Sat Sep 19 17:47:29 2020 -0600 Extend -Warray-bounds to detect out-of-bounds accesses to array parameters. gcc/ChangeLog: PR middle-end/82608 PR middle-end/94195 PR c/50584 PR middle-end/84051 * gimple-array-bounds.cc (get_base_decl): New function. (get_ref_size): New function. (trailing_array): New function. (array_bounds_checker::check_array_ref): Call them. Handle arrays declared in function parameters. (array_bounds_checker::check_mem_ref): Same. Handle references to dynamically allocated arrays. gcc/testsuite/ChangeLog: PR middle-end/82608 PR middle-end/94195 PR c/50584 PR middle-end/84051 * c-c++-common/Warray-bounds.c: Adjust. * gcc.dg/Wbuiltin-declaration-mismatch-9.c: Adjust. * gcc.dg/Warray-bounds-63.c: New test. * gcc.dg/Warray-bounds-64.c: New test. * gcc.dg/Warray-bounds-65.c: New test. * gcc.dg/Warray-bounds-66.c: New test. * gcc.dg/Warray-bounds-67.c: New test.
[Bug c/50584] No warning for passing small array to C99 static array declarator
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50584 --- Comment #18 from CVS Commits --- The master branch has been updated by Martin Sebor : https://gcc.gnu.org/g:baad4c48a85a354d2bf1b17e5aff71203c08adea commit r11-3305-gbaad4c48a85a354d2bf1b17e5aff71203c08adea Author: Martin Sebor Date: Sat Sep 19 17:37:05 2020 -0600 Extend -Wstringop-overflow to detect out-of-bounds accesses to array parameters. gcc/ChangeLog: PR c/50584 * builtins.c (warn_for_access): Add argument. Distinguish between reads and writes. (check_access): Add argument. Distinguish between reads and writes. (gimple_call_alloc_size): Set range even on failure. (gimple_parm_array_size): New function. (compute_objsize): Call it. (check_memop_access): Pass check_access an additional argument. (expand_builtin_memchr, expand_builtin_strcat): Same. (expand_builtin_strcpy, expand_builtin_stpcpy_1): Same. (expand_builtin_stpncpy, check_strncat_sizes): Same. (expand_builtin_strncat, expand_builtin_strncpy): Same. (expand_builtin_memcmp): Same. * builtins.h (compute_objsize): Declare a new overload. (gimple_parm_array_size): Declare. (check_access): Add argument. * calls.c (append_attrname): Simplify. (maybe_warn_rdwr_sizes): Handle internal attribute access. * tree-ssa-uninit.c (maybe_warn_pass_by_reference): Avoid adding quotes. gcc/testsuite/ChangeLog: PR c/50584 * c-c++-common/Wsizeof-pointer-memaccess1.c: Disable new expected warnings. * g++.dg/ext/attr-access.C: Update text of expected warnings. * gcc.dg/Wstringop-overflow-23.c: Same. * gcc.dg/Wstringop-overflow-24.c: Same. * gcc.dg/attr-access-none.c: Same. * gcc.dg/dfp/composite-type.c: Prune expected warnings. * gcc.dg/torture/pr57147-1.c: Add a member to an otherwise empty struct to avoid a warning. * gcc.dg/torture/pr57147-3.c: Same. * gcc.dg/Warray-bounds-30.c: Adjust. * gcc.dg/attr-access-none.c: Same. * gcc.dg/Wstringop-overflow-40.c: New test. * gcc.dg/attr-access-2.c: New test.
[Bug middle-end/84051] [7/8/9 Regression] missing -Warray-bounds on an out-of-bounds access via an array pointer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84051 --- Comment #6 from CVS Commits --- The master branch has been updated by Martin Sebor : https://gcc.gnu.org/g:3f9a497d1b0dd9da87908a11b59bf364ad40ddca commit r11-3306-g3f9a497d1b0dd9da87908a11b59bf364ad40ddca Author: Martin Sebor Date: Sat Sep 19 17:47:29 2020 -0600 Extend -Warray-bounds to detect out-of-bounds accesses to array parameters. gcc/ChangeLog: PR middle-end/82608 PR middle-end/94195 PR c/50584 PR middle-end/84051 * gimple-array-bounds.cc (get_base_decl): New function. (get_ref_size): New function. (trailing_array): New function. (array_bounds_checker::check_array_ref): Call them. Handle arrays declared in function parameters. (array_bounds_checker::check_mem_ref): Same. Handle references to dynamically allocated arrays. gcc/testsuite/ChangeLog: PR middle-end/82608 PR middle-end/94195 PR c/50584 PR middle-end/84051 * c-c++-common/Warray-bounds.c: Adjust. * gcc.dg/Wbuiltin-declaration-mismatch-9.c: Adjust. * gcc.dg/Warray-bounds-63.c: New test. * gcc.dg/Warray-bounds-64.c: New test. * gcc.dg/Warray-bounds-65.c: New test. * gcc.dg/Warray-bounds-66.c: New test. * gcc.dg/Warray-bounds-67.c: New test.
[Bug c/50584] No warning for passing small array to C99 static array declarator
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50584 --- Comment #19 from CVS Commits --- The master branch has been updated by Martin Sebor : https://gcc.gnu.org/g:3f9a497d1b0dd9da87908a11b59bf364ad40ddca commit r11-3306-g3f9a497d1b0dd9da87908a11b59bf364ad40ddca Author: Martin Sebor Date: Sat Sep 19 17:47:29 2020 -0600 Extend -Warray-bounds to detect out-of-bounds accesses to array parameters. gcc/ChangeLog: PR middle-end/82608 PR middle-end/94195 PR c/50584 PR middle-end/84051 * gimple-array-bounds.cc (get_base_decl): New function. (get_ref_size): New function. (trailing_array): New function. (array_bounds_checker::check_array_ref): Call them. Handle arrays declared in function parameters. (array_bounds_checker::check_mem_ref): Same. Handle references to dynamically allocated arrays. gcc/testsuite/ChangeLog: PR middle-end/82608 PR middle-end/94195 PR c/50584 PR middle-end/84051 * c-c++-common/Warray-bounds.c: Adjust. * gcc.dg/Wbuiltin-declaration-mismatch-9.c: Adjust. * gcc.dg/Warray-bounds-63.c: New test. * gcc.dg/Warray-bounds-64.c: New test. * gcc.dg/Warray-bounds-65.c: New test. * gcc.dg/Warray-bounds-66.c: New test. * gcc.dg/Warray-bounds-67.c: New test.
[Bug c/50584] No warning for passing small array to C99 static array declarator
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50584 --- Comment #17 from CVS Commits --- The master branch has been updated by Martin Sebor : https://gcc.gnu.org/g:6450f07388f9fe575a489c9309c36012b17b88b0 commit r11-3303-g6450f07388f9fe575a489c9309c36012b17b88b0 Author: Martin Sebor Date: Sat Sep 19 17:21:52 2020 -0600 Infrastructure & C front end changes for array parameter checking (PR c/50584). gcc/ChangeLog: PR c/50584 * attribs.c (decl_attributes): Also pass decl along with type attributes to handlers. (init_attr_rdwr_indices): Change second argument to attribute chain. Handle internal attribute representation in addition to external. (get_parm_access): New function. (attr_access::to_internal_string): Define new member function. (attr_access::to_external_string): Define new member function. (attr_access::vla_bounds): Define new member function. * attribs.h (struct attr_access): Declare new members. (attr_access::from_mode_char): Define new member function. (get_parm_access): Declare new function. * calls.c (initialize_argument_information): Pass function type attributes to init_attr_rdwr_indices. * doc/invoke.texi (-Warray-parameter, -Wvla-parameter): Document. * tree-pretty-print.c (dump_generic_node): Correct handling of qualifiers. * tree-ssa-uninit.c (maybe_warn_pass_by_reference): Same. * tree.h (access_mode): Add new enumerator. gcc/c-family/ChangeLog: PR c/50584 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute. (handle_argspec_attribute): New function. (get_argument, get_argument_type): New functions. (append_access_attrs): Add overload. Handle internal attribute representation in addition to external. (handle_access_attribute): Handle internal attribute representation in addition to external. (build_attr_access_from_parms): New function. gcc/c-family/ChangeLog: PR c/50584 * c-common.h (warn_parm_array_mismatch): Declare new function. (has_attribute): Move declaration of an existing function. (build_attr_access_from_parms): Declare new function. * c-warn.c (parm_array_as_string): Define new function. (plus_one): Define new function. (warn_parm_ptrarray_mismatch): Define new function. (warn_parm_array_mismatch): Define new function. (vla_bound_parm_decl): New function. * c.opt (-Warray-parameter, -Wvla-parameter): New options. * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type qualifiers here... (c_pretty_printer::direct_abstract_declarator): ...but instead print them in brackets here. Also print [static]. Strip extraneous expressions from VLA bounds. gcc/c/ChangeLog: PR c/50584 * c-decl.c (lookup_last_decl): Define new function. (c_decl_attributes): Call it. (start_decl): Add argument and use it. (finish_decl): Call build_attr_access_from_parms and decl_attributes. (get_parm_array_spec): Define new function. (push_parm_decl): Call get_parm_array_spec. (start_function): Call warn_parm_array_mismatch. Build attribute access and add it to current function. * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches in forms of array parameters. * c-tree.h (start_decl): Add argument. gcc/testsuite/ChangeLog: PR c/50584 * gcc.dg/attr-access-read-write-2.c: Adjust text of expected message. * c-c++-common/Warray-bounds-6.c: Correct C++ declaration, adjust text of expected diagnostics. * gcc.dg/Wbuiltin-declaration-mismatch-9.c: Prune expected warning. * gcc.dg/Warray-parameter-2.c: New test. * gcc.dg/Warray-parameter-3.c: New test. * gcc.dg/Warray-parameter-4.c: New test. * gcc.dg/Warray-parameter-5.c: New test. * gcc.dg/Warray-parameter.c: New test. * gcc.dg/Wvla-parameter-2.c: New test. * gcc.dg/Wvla-parameter-3.c: New test. * gcc.dg/Wvla-parameter.c: New test.
[Bug libstdc++/97120] circular concept loops in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97120 TC changed: What|Removed |Added CC||rs2740 at gmail dot com --- Comment #1 from TC --- Concept evaluation is lazy, not eager. See [temp.inst]/18.
[Bug ipa/96337] [10/11 Regression] GCC 10.2: twice as slow for -O2 -march=x86-64 vs. GCC 9.3/8.4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96337 --- Comment #20 from Jan Hubicka --- > OK, will do, but, at least superficially, our situation seems very similar to > this one, so I thought it would be better to keep this one going. But, again, > I'll open the new one as soon as I can make a test case for it, if this is > your > preference. Yes, please fill new bug report. There should be one issue per bug report with ocassional metabugs linking them together. Honza
[Bug ipa/96337] [10/11 Regression] GCC 10.2: twice as slow for -O2 -march=x86-64 vs. GCC 9.3/8.4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96337 --- Comment #19 from Vadim Zeitlin --- (In reply to Jan Hubicka from comment #18) > We need a reproducer to fix bugs. Yes, of course, I understand this. I just didn't have time to make one yet, we've literally discovered the issue only today (well, maybe yesterday, depending on the time zone). > So if you have actual testcase that > slow down, it would be great to open separate bug report for that. OK, will do, but, at least superficially, our situation seems very similar to this one, so I thought it would be better to keep this one going. But, again, I'll open the new one as soon as I can make a test case for it, if this is your preference.
[Bug ipa/96337] [10/11 Regression] GCC 10.2: twice as slow for -O2 -march=x86-64 vs. GCC 9.3/8.4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96337 --- Comment #18 from Jan Hubicka --- > I've just subscribed to this bug because we see bug slow downs in our project > when switching from 8.3 to 10.2 (89% slower in an important use case, 30% > slowdown more or less across the board), without any other changes. We don't > have any simple test showing this (yet), but there is definitely something > very > wrong here and I don't think it should be closed. > > FWIW in our case using -O3 doesn't help (it does make the code marginally > faster, but improvement of <0.01% is not worth 10% higher build time). We need a reproducer to fix bugs. So if you have actual testcase that slow down, it would be great to open separate bug report for that. It is best to have a self contained testcases, if that is not possible at least a perf profile and we can discuss with you what to do next. Honza
[Bug ipa/96337] [10/11 Regression] GCC 10.2: twice as slow for -O2 -march=x86-64 vs. GCC 9.3/8.4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96337 --- Comment #17 from Vadim Zeitlin --- I've just subscribed to this bug because we see bug slow downs in our project when switching from 8.3 to 10.2 (89% slower in an important use case, 30% slowdown more or less across the board), without any other changes. We don't have any simple test showing this (yet), but there is definitely something very wrong here and I don't think it should be closed. FWIW in our case using -O3 doesn't help (it does make the code marginally faster, but improvement of <0.01% is not worth 10% higher build time).
[Bug ipa/96337] [10/11 Regression] GCC 10.2: twice as slow for -O2 -march=x86-64 vs. GCC 9.3/8.4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96337 Jan Hubicka changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |WORKSFORME --- Comment #16 from Jan Hubicka --- It seems that the benchmarks was flawed. We could reopen if phoronix suceeds to reporduce them.
[Bug c++/97121] New: ICE (segfault) on incorrect default three-way comparison declaration
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97121 Bug ID: 97121 Summary: ICE (segfault) on incorrect default three-way comparison declaration Product: gcc Version: 10.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: warp at iki dot fi Target Milestone: --- Consider the following code (which mistakenly tries to return 'bool' from the three-way comparison rather than 'auto'): //-- #include class MyClass { int mValue; public: MyClass(int value): mValue(value) {} bool operator<=>(const MyClass&) const = default; }; int main() { MyClass a = 10, b = 15; return (a < b); } //-- Trying to compile it causes a segfault: test.cc: In member function ‘constexpr bool MyClass::operator<=>(const MyClass&) const’: test.cc:11:10: internal compiler error: Segmentation fault 11 | bool operator<=>(const MyClass&) const = default; | ^~~~ Please submit a full bug report, with preprocessed source if appropriate. The correct version (ie. with an 'auto' return value) compiles successfully.
[Bug fortran/89067] Inaccurate error message: 'i' at (1) is not a member of the 'x' structure
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89067 kargl at gcc dot gnu.org changed: What|Removed |Added CC||kargl at gcc dot gnu.org --- Comment #3 from kargl at gcc dot gnu.org --- (In reply to Antony Lewis from comment #1) > The error message on this code > > subroutine test > type x > end type > type, extends(x):: y > integer ii > end type > type(y) yy > > yy%i=1 > end subroutine > > is > > > Error: 'i' at (1) is not a member of the 'x' structure > > But it should refer to the 'y' structure, not the base class 'x'. Obviously > minor and low priority, but more less helpful if y is a deep derived class. This error can be considered to be correct. During parsing 'i' is found not to be a component in 'y', so the compiler goes the next level up and find that 'i' is not a component in 'x'. So, the component is not found in the upper-most level and therefore is an invalid reference. This should be closed as WONTFIX.
[Bug fortran/85836] [meta-bug] Fortran 2018 support
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85836 Bug 85836 depends on bug 97036, which changed state. Bug 97036 Summary: [F2018] ELEMENTAL RECURSIVE subprogram prefix combination rejected https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97036 What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED
[Bug fortran/97036] [F2018] ELEMENTAL RECURSIVE subprogram prefix combination rejected
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97036 anlauf at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #4 from anlauf at gcc dot gnu.org --- Fixed on master for gcc-11. Thanks for the report!
[Bug fortran/97036] [F2018] ELEMENTAL RECURSIVE subprogram prefix combination rejected
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97036 --- Comment #3 from CVS Commits --- The master branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:f7d2d4be7650acceb9d39327e21ee04f640c152f commit r11-3298-gf7d2d4be7650acceb9d39327e21ee04f640c152f Author: Harald Anlauf Date: Sat Sep 19 20:46:38 2020 +0200 PR fortran/97036 - [F2018] Allow ELEMENTAL RECURSIVE procedure prefix gcc/fortran/ChangeLog: * symbol.c (gfc_check_conflict): Allow ELEMENTAL RECURSIVE procedure prefix for -std=f2018. gcc/testsuite/ChangeLog: * gfortran.dg/pr97036.f90: New test.
[Bug fortran/93423] [8/9/10/11 Regression] ICE on invalid with argument list for module procedure
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93423 anlauf at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #14 from anlauf at gcc dot gnu.org --- Fixed on master and backported to all open branches, including Tobias' fix for PR96041. Thanks for the report!
[Bug fortran/93423] [8/9/10/11 Regression] ICE on invalid with argument list for module procedure
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93423 --- Comment #13 from CVS Commits --- The releases/gcc-8 branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:e0c7ff6237c78d99b40869afbdcdbe27fe98b698 commit r8-10521-ge0c7ff6237c78d99b40869afbdcdbe27fe98b698 Author: Tobias Burnus Date: Thu Sep 17 14:01:09 2020 +0200 Fortran: Avoid double-free with parse error (PR96041, PR93423) gcc/fortran/ PR fortran/96041 PR fortran/93423 * decl.c (gfc_match_submod_proc): Avoid later double-free in the error case. (cherry picked from commit c12facd22881517127ebbe213d7ecc7fc1fcea4e)
[Bug fortran/96041] [11 regression] ICE in gfortran.dg/pr93423.f90 after r11-1792
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96041 --- Comment #14 from CVS Commits --- The releases/gcc-8 branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:e0c7ff6237c78d99b40869afbdcdbe27fe98b698 commit r8-10521-ge0c7ff6237c78d99b40869afbdcdbe27fe98b698 Author: Tobias Burnus Date: Thu Sep 17 14:01:09 2020 +0200 Fortran: Avoid double-free with parse error (PR96041, PR93423) gcc/fortran/ PR fortran/96041 PR fortran/93423 * decl.c (gfc_match_submod_proc): Avoid later double-free in the error case. (cherry picked from commit c12facd22881517127ebbe213d7ecc7fc1fcea4e)
[Bug fortran/93423] [8/9/10/11 Regression] ICE on invalid with argument list for module procedure
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93423 --- Comment #12 from CVS Commits --- The releases/gcc-8 branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:aef149efb6d3fc97a38c74f7022124a6ba247746 commit r8-10520-gaef149efb6d3fc97a38c74f7022124a6ba247746 Author: Harald Anlauf Date: Thu Jul 2 20:48:16 2020 +0200 PR fortran/93423 - ICE on invalid with argument list for module procedure When recovering from an error, a NULL pointer dereference could occur. Check for that situation and punt. gcc/fortran/ PR fortran/93423 * resolve.c (resolve_symbol): Avoid NULL pointer dereference. (cherry picked from commit b88744905a46be44ffa3c57d46080f601ae832b8)
[Bug fortran/93423] [8/9/10/11 Regression] ICE on invalid with argument list for module procedure
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93423 --- Comment #11 from CVS Commits --- The releases/gcc-9 branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:0e442063a0adf01e6348e9fc55cc3e9869974769 commit r9-8921-g0e442063a0adf01e6348e9fc55cc3e9869974769 Author: Tobias Burnus Date: Thu Sep 17 14:01:09 2020 +0200 Fortran: Avoid double-free with parse error (PR96041, PR93423) gcc/fortran/ PR fortran/96041 PR fortran/93423 * decl.c (gfc_match_submod_proc): Avoid later double-free in the error case. (cherry picked from commit c12facd22881517127ebbe213d7ecc7fc1fcea4e)
[Bug fortran/93423] [8/9/10/11 Regression] ICE on invalid with argument list for module procedure
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93423 --- Comment #10 from CVS Commits --- The releases/gcc-9 branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:5ec4a3d307210b5c62e9718eff4a32b058e14c78 commit r9-8920-g5ec4a3d307210b5c62e9718eff4a32b058e14c78 Author: Harald Anlauf Date: Thu Jul 2 20:48:16 2020 +0200 PR fortran/93423 - ICE on invalid with argument list for module procedure When recovering from an error, a NULL pointer dereference could occur. Check for that situation and punt. gcc/fortran/ PR fortran/93423 * resolve.c (resolve_symbol): Avoid NULL pointer dereference. (cherry picked from commit b88744905a46be44ffa3c57d46080f601ae832b8)
[Bug fortran/96041] [11 regression] ICE in gfortran.dg/pr93423.f90 after r11-1792
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96041 --- Comment #13 from CVS Commits --- The releases/gcc-9 branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:0e442063a0adf01e6348e9fc55cc3e9869974769 commit r9-8921-g0e442063a0adf01e6348e9fc55cc3e9869974769 Author: Tobias Burnus Date: Thu Sep 17 14:01:09 2020 +0200 Fortran: Avoid double-free with parse error (PR96041, PR93423) gcc/fortran/ PR fortran/96041 PR fortran/93423 * decl.c (gfc_match_submod_proc): Avoid later double-free in the error case. (cherry picked from commit c12facd22881517127ebbe213d7ecc7fc1fcea4e)
[Bug other/97076] clang-format file does not work for some C++11 code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97076 Dimitrij Mijoski changed: What|Removed |Added Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED --- Comment #2 from Dimitrij Mijoski --- Fixed in https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=172178c0c35e1dabb778c80c26dc872136c45cf5
[Bug target/96861] Integer min/max optimization failed under -march=skylake-avx512
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96861 --- Comment #7 from CVS Commits --- The master branch has been updated by H.J. Lu : https://gcc.gnu.org/g:c66c004ad610f4f02d5f065fe29c4c10f05ae13f commit r11-3297-gc66c004ad610f4f02d5f065fe29c4c10f05ae13f Author: H.J. Lu Date: Sat Sep 19 09:57:16 2020 -0700 x86: Add a testcase for PR target/96861 Add a testcase to verify that -march=skylake-avx512 -mtune=skylake-avx512 generates desired code sequence. PR target/96861 * gcc.target/i386/pr96861.c: New test.
[Bug target/96789] x264: sub4x4_dct() improves when vectorization is disabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96789 --- Comment #16 from Hongtao.liu --- I notice 0x5561dc0 _36 * 2 1 times scalar_stmt costs 16 in body 0x5561dc0 _38 * 2 1 times scalar_stmt costs 16 in body 0x5562df0 _36 * 2 1 times vector_stmt costs 16 in body 0x5562df0 _38 * 2 1 times vector_stmt costs 16 in body ix86_multiplication_cost would be called for cost estimation, but in pass_expand, synth_mult will tranform the multiplization to shift. So shift cost should be used in this case, not mult.
[Bug libstdc++/97120] New: circular concept loops in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97120 Bug ID: 97120 Summary: circular concept loops in Product: gcc Version: 10.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: a...@cloudius-systems.com Target Milestone: --- The following example compiles with gcc and fails with clang. I believe clang is correct but can't prove it. === begin example = #include void foo() { std::ranges::iota_view iota(2, 10); iota.begin(); } end example == Clang complains that iota_view doesn't have a begin() member (which it does). I think the reason is that the constraint is evaluated before iota_view is fully defined. gcc evaluates lazily so it doesn't stumble on the problem. The circular chain is: view_interface is instantiated as a base class of iota_view. Clearly iota_view isn't defined at this stage, it's just a forward-declared name. view_interface instantiates iterator_t, which is an alias to std::__detail::__range_iter_t. __range_iter_t instantiates __ranges_begin. __ranges_begin requires that its template parameter is a __member_begin<> (among other options, but this is the valid one here). __member_begin requires that the type (iota_view) have a begin() function. But the type isn't defined yet. I believe clang is correct, mostly because I believe concept evaluation should be eager and not lazy, not because I know it for a fact. Apologies for posting a clang issue here, I wouldn't if gcc could get asan+coroutines working. The problem will hit gcc if it implements eager evaluation too.
[Bug c++/97051] Evaluating is_constant_evaluated in requires clause fails
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97051 --- Comment #4 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:dea470d09155f2007bdd502c16614128cb6f9348 commit r11-3295-gdea470d09155f2007bdd502c16614128cb6f9348 Author: Patrick Palka Date: Sat Sep 19 11:17:41 2020 -0400 c++: std::is_constant_evaluated inside constraint [PR97051] According to [expr.const]/14, the result of substitution into an atomic constraint is manifestly constant-evaluated; this patch adjusts the call to maybe_constant_value in satisfy_atom to that effect. gcc/cp/ChangeLog: PR c++/97051 * constraint.cc (satisfy_atom): Pass true as the manifestly_const_eval argument to maybe_constant_value. gcc/testsuite/ChangeLog: PR c++/97051 * g++.dg/cpp2a/is-constant-evaluated11.C: New test.
[Bug c++/97103] [10/11 Regression] ICE on nested requires expression template template instantiation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97103 --- Comment #4 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:e5d72c840a226fdbab65912f97d42a1dbdaf6ed2 commit r11-3296-ge5d72c840a226fdbab65912f97d42a1dbdaf6ed2 Author: Patrick Palka Date: Sat Sep 19 11:02:46 2020 -0400 c++: Fix self-mapping in map_arguments [PR96531, PR97103] With r10-8077 we stopped passing the argified current_template_parms to normalize_constraint_expression from finish_nested_requirement, and instead made map_arguments perform a self-mapping of parameters when args is NULL. But we're currently not handling parameter packs and BOUND_TEMPLATE_TEMPLATE_PARMs properly during this self-mapping, which leads to ICEs later during satisfaction. To properly handle self-mapping of a parameter pack, this patch extends template_parm_to_arg to handle TEMPLATE_PARM_P nodes, and makes map_arguments use it. (This change revealed that the call to template_parm_to_arg in convert_generic_types_to_packs was a no-op because the argument 't' is never a TREE_LIST, so this patch additionally removes this call.) As for bound ttps, map_arguments before r10-8077 would map a BOUND_TEMPLATE_TEMPLATE_PARM not to itself but to its underlying TEMPLATE_TEMPLATE_PARM. We could restore this behavior in map_arguments, but since a bound ttp is not really a template parameter it seems better to make keep_template_parm not give us a bound ttp in the first place. So this patch makes keep_template_parm return the underlying ttp when it sees a bound ttp. gcc/cp/ChangeLog: PR c++/96531 PR c++/97103 * constraint.cc (map_arguments): Call template_parm_to_arg in the self-mapping case. (finish_shorthand_constraint): No need to build a TREE_LIST before calling template_parm_to_arg. * pt.c (template_parm_to_arg): Rewrite to handle TEMPLATE_PARM_P nodes as well as DECL_TEMPLATE_PARM_P nodes, and to make the overlying TREE_LIST node optional. (keep_template_parm): Don't record a BOUND_TEMPLATE_TEMPLATE_PARM, instead record its corresponding TEMPLATE_TEMPLATE_PARM. (convert_generic_types_to_packs): Don't call template_parm_to_arg. gcc/testsuite/ChangeLog: PR c++/96531 PR c++/97103 * g++.dg/cpp2a/concepts-ttp2.C: New test. * g++.dg/cpp2a/concepts-variadic1.C: New test.
[Bug c++/96531] [10/11 Regression] ICE for concepts here.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96531 --- Comment #2 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:e5d72c840a226fdbab65912f97d42a1dbdaf6ed2 commit r11-3296-ge5d72c840a226fdbab65912f97d42a1dbdaf6ed2 Author: Patrick Palka Date: Sat Sep 19 11:02:46 2020 -0400 c++: Fix self-mapping in map_arguments [PR96531, PR97103] With r10-8077 we stopped passing the argified current_template_parms to normalize_constraint_expression from finish_nested_requirement, and instead made map_arguments perform a self-mapping of parameters when args is NULL. But we're currently not handling parameter packs and BOUND_TEMPLATE_TEMPLATE_PARMs properly during this self-mapping, which leads to ICEs later during satisfaction. To properly handle self-mapping of a parameter pack, this patch extends template_parm_to_arg to handle TEMPLATE_PARM_P nodes, and makes map_arguments use it. (This change revealed that the call to template_parm_to_arg in convert_generic_types_to_packs was a no-op because the argument 't' is never a TREE_LIST, so this patch additionally removes this call.) As for bound ttps, map_arguments before r10-8077 would map a BOUND_TEMPLATE_TEMPLATE_PARM not to itself but to its underlying TEMPLATE_TEMPLATE_PARM. We could restore this behavior in map_arguments, but since a bound ttp is not really a template parameter it seems better to make keep_template_parm not give us a bound ttp in the first place. So this patch makes keep_template_parm return the underlying ttp when it sees a bound ttp. gcc/cp/ChangeLog: PR c++/96531 PR c++/97103 * constraint.cc (map_arguments): Call template_parm_to_arg in the self-mapping case. (finish_shorthand_constraint): No need to build a TREE_LIST before calling template_parm_to_arg. * pt.c (template_parm_to_arg): Rewrite to handle TEMPLATE_PARM_P nodes as well as DECL_TEMPLATE_PARM_P nodes, and to make the overlying TREE_LIST node optional. (keep_template_parm): Don't record a BOUND_TEMPLATE_TEMPLATE_PARM, instead record its corresponding TEMPLATE_TEMPLATE_PARM. (convert_generic_types_to_packs): Don't call template_parm_to_arg. gcc/testsuite/ChangeLog: PR c++/96531 PR c++/97103 * g++.dg/cpp2a/concepts-ttp2.C: New test. * g++.dg/cpp2a/concepts-variadic1.C: New test.
[Bug target/96861] Integer min/max optimization failed under -march=skylake-avx512
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96861 Hongtao.liu changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #6 from Hongtao.liu --- Fixed in GCC11.
[Bug target/96861] Integer min/max optimization failed under -march=skylake-avx512
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96861 --- Comment #5 from CVS Commits --- The master branch has been updated by hongtao Liu : https://gcc.gnu.org/g:83858ba1db31cd83667592a41d71315090459da4 commit r11-3294-g83858ba1db31cd83667592a41d71315090459da4 Author: liuhongt Date: Wed Sep 16 10:53:52 2020 +0800 Increase rtx cost of sse_to_integer in skylake_cost. As https://gcc.gnu.org/pipermail/gcc-patches/2019-August/528839.html indicates, movement between SSE and gpr should be much expensive than movement inside gpr(which is 2 as default). gcc/ChangeLog PR target/96861 * config/i386/x86-tune-costs.h (skylake_cost): increase rtx cost of sse_to_integer from 2 to 6. gcc/testsuite * gcc.target/i386/pr95021-3.c: Add -mtune=generic.