Summary: | sys-devel/gcc-11.2.1_p20220115: internal compiler error in tree_to_shwi with vla in struct and sprintf | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | cpu <cpuandroidmarket> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105604 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
cpu
2022-05-13 18:45:29 UTC
Works for me with GCC 11.3 and 12.1. Can you try 11.3? (In reply to Sam James from comment #1) > Works for me with GCC 11.3 and 12.1. Can you try 11.3? With gcc 11.3.0 the behavior is the same (In reply to cpu from comment #0) > Hi. In the course of my experiments with the C language, I encountered the > following error: > > $ LC_ALL=C make > cc -Wall -O2 -march=native -pipe -fomit-frame-pointer -c -o main.o main.c > during GIMPLE pass: strlen > main.c: In function 'main': > main.c:57:5: internal compiler error: in tree_to_shwi, at tree.c:7452 > 57 | int main(){ > | ^~~~ What does -march=native expand for you? You can follow https://wiki.gentoo.org/wiki/Gcc-ICE-reporting-guide#Expand_-march.3Dnative.2C_exact_gcc_version_and_other_system-specific_options to get the expansion. Try to identify minimum amount of -m options needed to trigger the failure. (In reply to Sergei Trofimovich from comment #3) > (In reply to cpu from comment #0) > > Hi. In the course of my experiments with the C language, I encountered the > > following error: > > > > $ LC_ALL=C make > > cc -Wall -O2 -march=native -pipe -fomit-frame-pointer -c -o main.o main.c > > during GIMPLE pass: strlen > > main.c: In function 'main': > > main.c:57:5: internal compiler error: in tree_to_shwi, at tree.c:7452 > > 57 | int main(){ > > | ^~~~ > > What does -march=native expand for you? > > You can follow > https://wiki.gentoo.org/wiki/Gcc-ICE-reporting-guide#Expand_-march.3Dnative. > 2C_exact_gcc_version_and_other_system-specific_options to get the expansion. > > Try to identify minimum amount of -m options needed to trigger the failure. I experimented a bit and realized that -march has no effect on the appearance of the error. The error occurs when using the -Wall and -O2 options at the same time. (In reply to cpu from comment #4) > I experimented a bit and realized that -march has no effect on the > appearance of the error. The error occurs when using the -Wall and -O2 > options at the same time. Aha, thank you! I reproduced locally as well. Filed https://gcc.gnu.org/PR105604 upstream. Fixed for 12 (which is now stable). Upstream say on bug it doesn't apply cleanly to 11, so let's close. |