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]
Other format: [Raw text]

Re: optimization/7520: internal compiler error in verify_local_live_at_start


Hi,

the bug can be reproduced with the following code snippet:

-------------------------------snip here-------------------------
int foo()
{
    int i;
    long long int j;

    while (1)
    {
        if (j & 1) ++i;
        j >>= 1;
        if (j) return i;
    }
}

int bar()
{
    if (foo()) return;
}
-------------------------------snip here-------------------------

Just compile with "gcc -O3" on an i686-pc-linux-gnu box to get the
following error:

bug.c: In function `bar':
bug.c:17: Internal compiler error in verify_local_live_at_start,
at flow.c:583
Please submit a full bug report, [etc.]

The code is at least questionable as "bar" should return a value.
(The same situation occurs in the original example: "getexposure"
should return an int, but the last return statement does not return
a value.)

Greetings,
Volker Reichelt

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7520



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