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 target/56406] New: attribute((target(xpto))) causes ICE in i386 and rs6000


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

             Bug #: 56406
           Summary: attribute((target(xpto))) causes ICE in i386 and
                    rs6000
    Classification: Unclassified
           Product: gcc
           Version: 4.7.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: paulo@matos-sorge.com


While doing some tests I came across this ICE:
int __attribute__((__target__(xpto)))
foo(int x)
{
  if (x == 1)
    return x;
  else
    return x * foo (x-1);
}


If any word instead  of xpto works. The compiler fails with:
internal compiler error: in ix86_valid_target_attribute_inner_p, at
config/i386/i386.c:4214


This is because it's expecting either a STRING_CST ("xpto") or a TREE_CHAIN. If
an identifier node is seen instead we hit a gcc_unreachable. The other backend
that should be affected by this (but I didn't reproduce it) is rs6000.


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