https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68095
Bug ID: 68095
Summary: "cc" clobber with Flag Output Operands
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: inline-asm
Assignee: unassigned at gcc dot gnu.org
Reporter: gccbugzilla at limegreensocks dot com
Target Milestone: ---
Normally when trying to use a register and clobber it at the same time, the
compiler kicks out an error (operand has impossible constraints). However that
doesn't happen when using Flag Output Operands and the "cc" clobber:
asm ("cmp %2, %1" : "=@ccc"(r) : "m"(*p), "ri"(2): "cc");
Should this be a conflict?
On the other hand, the asm is changing the flags. So is the "cc" *required*?
But it doesn't seem to be:
asm ("cmp %2, %1" : "=@ccc"(r) : "m"(*p), "ri"(2));
Now that asm flags are a real thing, we should pick one and enforce it.