https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127326
Bug ID: 127326
Summary: [x86_32] error: inconsistent operand constraints in an
'asm'
Product: gcc
Version: 16.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: ubizjak at gmail dot com
Target Milestone: ---
The following testcase:
--cut here--
_Decimal128 test (void)
{
union { _Decimal128 d; unsigned long long u[2]; } u;
u.d = 1.0DL;
__asm ("" : "+g" (u.d));
return u.d;
}
--cut here--
fails to compile with on i686 with -O2:
$ gcc -O2 -m32 inout.c
inout.c: In function ‘test’:
inout.c:5:3: error: inconsistent operand constraints in an ‘asm’
5 | __asm ("" : "+g" (u.d));
| ^~~~~
The testcase compiles OK for x86_64.