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

            Bug ID: 61779
           Summary: gcc -Og fails with impossible constraint on legal C
                    code
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zeccav at gmail dot com

Created attachment 33108
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33108&action=edit
Same code as in the bug Description

The following code compiles fine without the -Og option.
Compiled with -Og gcc fails.

/* gcc -Og error: impossible constraint in ‘asm’ */
extern unsigned long long __sdt_unsp;
void
f(void)
{
 for (;;)
  __asm__ (".pushsection .note.stapsdt" "," "\"?\"" "," "\"note\"" "\n" ".4byte
992f-991f" "," "994f-993f" "," "3" "\n" ".asciz \"%n[_SDT_S1]@%[_SDT_A1]\""
"\n" :: [_SDT_S1] "n" (((!__extension__ (__builtin_constant_p ((((unsigned long
long) (__typeof (__builtin_choose_expr (((__builtin_classify_type (0) + 3) &
-4) == 4, (0), 0U))) __sdt_unsp) ) == 0) )) ? 1 : -1) ), [_SDT_A1] "nor"
((0)));
}

Reply via email to