This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c/1510: Internal compiler error in `build_insn_chain', at global.c:1756



>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;
        }
    }
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]