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

            Bug ID: 95652
           Summary: GCC 8.3.1 generates syntactically incorrect assembly
                    code
           Product: gcc
           Version: 8.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: teo.samarzija at gmail dot com
  Target Milestone: ---

Hey, guys!

So, I think I've found a bug in GCC 8.3.1 that occurs on Linux. Here is a
simple test case:

int printf(const char*,...);

float eax;

int main() {
    eax=7;
    printf("%lf\n",eax);
}

When compiled with "gcc -masm=intel -o test test.c", I get the error messages:

/tmp/ccGiemfM.s: Assembler messages:
/tmp/ccGiemfM.s:20: Error: invalid use of register
/tmp/ccGiemfM.s:21: Error: invalid use of register

It appears as though GCC 8.3.1 generates syntactically incorrect assembly code
for that.
Possibly related: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52554

Reply via email to