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 inline-asm/34832] New: rejects "i"(static_const_var) without -O2


Hi.

Opening per suggestion in Bug 23200.

The following program:
---
int main()
{
    static const int i = 1;
    asm volatile ("" :: "i"(i));
    return i;
}
---

gives this when compiled without -O2:
---
asc1.c: In function 'main':
asc1.c:4: warning: asm operand 0 probably doesn't match constraints
asc1.c:4: error: impossible constraint in 'asm'
---

Using -O2 makes it to compile.


-- 
           Summary: rejects "i"(static_const_var) without -O2
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: inline-asm
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: stsp at users dot sourceforge dot net
  GCC host triplet: x86_64, i386


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


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