Bug 20645 - Complilation success depends on optimization being used
Summary: Complilation success depends on optimization being used
Status: RESOLVED DUPLICATE of bug 11203
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 3.4.3
: P3 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2005-03-25 23:40 UTC by mikulas
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description mikulas 2005-03-25 23:40:26 UTC
When this function is compiled with -O, it works. When it's compiled without -O,
it reports error "error: can't find a register in class `GENERAL_REGS' while
reloading `asm'".

I think that syntactic corectness of language shouldn't depend on optimization
flags --- it should either report error in both cases or always succeed.

void f(char *p)
        asm volatile
Comment 1 Andrew Pinski 2005-03-26 00:29:21 UTC

*** This bug has been marked as a duplicate of 11203 ***