inline-asm/10123: inconsistent operand constraints cause ICE at -O0

gccmail@whalesolutions.ca gccmail@whalesolutions.ca
Mon Mar 17 15:48:00 GMT 2003


>Number:         10123
>Category:       inline-asm
>Synopsis:       inconsistent operand constraints cause ICE at -O0
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 17 14:56:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Jonah Graham
>Release:        gcc version 3.3 20030303 (prerelease)
>Organization:
>Environment:
i686-pc-cygwin
>Description:
When a register constraint that is an EXTRA_CONSTRAINT for the machine and the extra constraint only accepts a constant, an ICE occurs in instantiate_virtual_regs_1, at function.c:4087, but only when compiled with -O0. An example is 'e' on x86. (This run is from 3.3, but it also occurs in 3.1.) 

int main(int argc, char **argv)
{
        asm volatile ("" : "=e" (argc) : );
        return 0;
}

$ ./xgcc -B. -v
Reading specs from ./specs
Configured with: /cygdrive/q/csp/taz/gcc-20030303/configure --enable-languages=c
Thread model: single
gcc version 3.3 20030303 (prerelease)

>How-To-Repeat:
$ cat extra_constraint.c
int main(int argc, char **argv)
{
        asm volatile ("" : "=e" (argc) : );
        return 0;
}

$ cat immed_constraint.c
int main(int argc, char **argv)
{
        asm volatile ("" : "=I" (argc) : );
        return 0;
}

$ ./xgcc -B. -O0 extra_constraint.c
extra_constraint.c: In function `main':
extra_constraint.c:5: internal compiler error: in instantiate_virtual_regs_1, at function.c:4087
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

$ ./xgcc -B. -O1 extra_constraint.c
extra_constraint.c: In function `main':
extra_constraint.c:3: error: inconsistent operand constraints in an `asm'

$ ./xgcc -B. -O0 immed_constraint.c
immed_constraint.c: In function `main':
immed_constraint.c:3: error: inconsistent operand constraints in an `asm'
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list