This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c/1510: Internal compiler error in `build_insn_chain', at global.c:1756
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c/1510: Internal compiler error in `build_insn_chain', at global.c:1756
- From: foom at fuhm dot net
- Date: 26 Dec 2000 05:16:30 -0000
- Reply-To: foom at fuhm dot net
>Number: 1510
>Category: c
>Synopsis: Internal compiler error in `build_insn_chain', at global.c:1756
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-illegal-code
>Submitter-Id: net
>Arrival-Date: Mon Dec 25 21:26:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: foom@fuhm.net
>Release: gcc version 2.95.2 20000220 (Debian GNU/Linux)
>Organization:
>Environment:
Machine: i386 Linux 2.2.18
>Description:
Gets the following error when compiling the attached file.
It should simply report an undefined variable.
The bug seems heavily dependant on the exact values used in the switch statement.
gccbug.c:29: Internal compiler error in `build_insn_chain', at global.c:1756
>How-To-Repeat:
compile the code with gcc -O1
gcc with fewer or more optimizations fail to exhibit the bug.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="gccbug.c"
Content-Disposition: inline; filename="gccbug.c"
void do_stuff();
void break_gcc(int test)
{
if (undefined_variable)
exit(1);
while(1)
{
switch (test)
{
case 26:
case 10:
case 2:
do_stuff();
break;
case 4:
case 3:
return;
break;
}
}
}