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/68014] New: ICE when using Flag Output Operands


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

            Bug ID: 68014
           Summary: ICE when using Flag Output Operands
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gccbugzilla at limegreensocks dot com
  Target Milestone: ---

This code:

   #ifndef __GCC_ASM_FLAG_OUTPUTS__
   #error Not Defined
   #else

   int main()
   {
      int x;
      asm volatile("# %0" : "=@ccc"(x));
   }

   #endif

Gives this error:

   internal compiler error: in print_reg

I can't think of any way you could ever use the @cc parameter in the template. 
It seems like any attempt to do this should be invalid by definition.  Perhaps
@cc shouldn't even be issued one of the (limited number of) parameter #'s? 
That would solve the problem.  But for sure, ICE is not the right answer.

Note that the docs do say "the operand should not be referenced within the
assembler template via %0 etc, as there's no corresponding text in the assembly
language."

But there is a difference between "should not", "can not" and ICE.


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