https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84187

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This inline-asm is invalid for -O0 where no optimizations is done.
Reduced testcase:
static inline  __attribute__((always_inline)) 
void _static_cpu_has(unsigned short bit)
{
      asm ("": : "i" (bit)); 
}
void
GccCompileError_init(void)
{
    _static_cpu_has(( 9*32+10)) ;
}

bit is not a literal constant so at -O0 there is no expectation that bit would
match the "i" constraints.

Reply via email to