This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/53353] New: Missing error/warning when using __int128_t with incorrect asm register constraints


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53353

             Bug #: 53353
           Summary: Missing error/warning when using __int128_t with
                    incorrect asm register constraints
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: svfuerst@gmail.com


The following (nonsensical) code should give an error (or at least a warning)
about the 128 bit type not fitting into a register:

void foo(__int128_t x)
{
    asm("mov %0, bar":: "r" (x));
}

Instead, the above compiles into an instruction that uses the 16 bit register
%ax.

(Compiled with -Wall -W)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]