[Bug ipa/105438] [11/12/13/14 Regression] Incorrect array-bounds warning with array size carried over from a previous template instantiation since r11-4987-g602c6cfc79ce4ae6

2023-07-20 Thread bernie at codewiz dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105438 Bernie Innocenti changed: What|Removed |Added Version|11.3.0 |13.1.1 Target Milestone|11.5

[Bug ipa/105438] [11/12/13 Regression] Incorrect array-bounds warning with array size carried over from a previous template instantiation since r11-4987-g602c6cfc79ce4ae6

2023-01-21 Thread bernie at codewiz dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105438 --- Comment #10 from Bernie Innocenti --- Still present on GCC 12.2. Could someone look into it please, or point me at the point in ipa-icf.cc where the array-bounds analysis information should have been updated after merging the template

[Bug c++/105438] Incorrect array-bounds warning with array size carried over from a previous template instantiation

2022-05-02 Thread bernie at codewiz dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105438 --- Comment #4 from Bernie Innocenti --- Furthermore, after the inline pass main() has a reference to the shorter array with an annotation of int[7], which is clearly wrong: [local count: 939524097]: _5 = MEM[(const int[7] &)][i_4];

[Bug c++/105438] Incorrect array-bounds warning with array size carried over from a previous template instantiation

2022-05-02 Thread bernie at codewiz dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105438 --- Comment #3 from Bernie Innocenti --- Not sure if this is helpful, but the IPA dump also shows two calls to configure() with N=7 and none with N=2: IPA function summary for int main()/3 inlinable global time: 26.00 self size:

[Bug c++/105438] Incorrect array-bounds warning with array size carried over from a previous template instantiation

2022-05-02 Thread bernie at codewiz dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105438 --- Comment #2 from Bernie Innocenti --- GCC 12.0.1 20220413 (Red Hat 12.0.1-0) gives a more helpful diagnostic with inlining backtrace: In function ‘void configure(const int (&)[N], int) [with int N = 7]’, inlined from ‘void

[Bug c++/105438] Incorrect array-bounds warning with array size carried over from a previous template instantiation

2022-04-30 Thread bernie at codewiz dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105438 --- Comment #1 from Bernie Innocenti --- Reproducible in Godbolt with any 11.x release as well as trunk: https://godbolt.org/z/zWb55P8G7

[Bug c++/105438] New: Incorrect array-bounds warning with array size carried over from a previous template instantiation

2022-04-30 Thread bernie at codewiz dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105438 Bug ID: 105438 Summary: Incorrect array-bounds warning with array size carried over from a previous template instantiation Product: gcc Version: 11.3.0 Status:

[Bug c++/98824] [C++-20] function template non-type-class-arg deduction fails with a reason that looks bogus

2022-01-17 Thread bernie at codewiz dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98824 --- Comment #4 from Bernie Innocenti --- Are there any known workarounds?

[Bug c++/98824] [C++-20] function template non-type-class-arg deduction fails with a reason that looks bogus

2022-01-17 Thread bernie at codewiz dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98824 Bernie Innocenti changed: What|Removed |Added CC||bernie at codewiz dot org ---

[Bug c++/79001] spurious "defined but not used" warning with explicit instantiation

2021-11-05 Thread bernie at codewiz dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79001 --- Comment #5 from Bernie Innocenti --- clang with -Wunused-function also does not issue a warning for this testcase.

[Bug c++/79001] spurious "defined but not used" warning with explicit instantiation

2021-11-05 Thread bernie at codewiz dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79001 --- Comment #4 from Bernie Innocenti --- GCC 5.1 does not issue a warning.

[Bug c++/79001] spurious "defined but not used" warning with explicit instantiation

2021-11-05 Thread bernie at codewiz dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79001 Bernie Innocenti changed: What|Removed |Added CC||bernie at codewiz dot org ---