public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/56167] New: ICE with invalid __attribute__ arguments
@ 2013-02-01  1:50 d.g.gorbachev at gmail dot com
  2013-02-01  7:43 ` [Bug middle-end/56167] " jakub at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2013-02-01  1:50 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56167
           Summary: ICE with invalid __attribute__ arguments
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: d.g.gorbachev@gmail.com


$ cat > bug.c
extern void foo(void) __attribute__((target(0)));

int main(void)
{
  foo();
  return 0;
}
^D
$ gcc -S bug.c
bug.c:1:1: internal compiler error: in ix86_valid_target_attribute_inner_p, at
config/i386/i386.c:4226
 extern void foo(void) __attribute__((target(0)));
 ^
[...]
$ sed -i s/target/error/ bug.c
$ gcc -S bug.c
bug.c: In function 'main':
bug.c:5:6: internal compiler error: tree check: expected string_cst, have
integer_cst in expand_expr_real_1, at expr.c:10191
   foo();
      ^
[...]
$ sed -i s/error/warning/ bug.c
$ gcc -S bug.c
bug.c: In function 'main':
bug.c:5:6: internal compiler error: tree check: expected string_cst, have
integer_cst in expand_expr_real_1, at expr.c:10198
   foo();
      ^
[...]

A few other __attribute__ bugs:

$ sed -i s/warning/weakref/ bug.c
$ gcc -S bug.c
bug.c:1:1: error: attribute 'alias' argument not a string
 extern void foo(void) __attribute__((weakref(0)));
 ^
bug.c:1:13: warning: 'weakref' attribute should be accompanied with an 'alias'
attribute [-Wattributes]
 extern void foo(void) __attribute__((weakref(0)));
             ^
$ sed -i s/weakref/section/ bug.c
$ gcc -S bug.c
bug.c:1:13: error: section attribute not allowed for 'foo'
 extern void foo(void) __attribute__((section(0)));
             ^
$ echo 'void *foo(int) __attribute__((alloc_size("1")));' > 1.c
$ gcc -S 1.c
1.c:1:1: warning: alloc_size parameter outside range [-Wattributes]
 void *foo(int) __attribute__((alloc_size("1")));
 ^


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-02-05  8:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-01  1:50 [Bug middle-end/56167] New: ICE with invalid __attribute__ arguments d.g.gorbachev at gmail dot com
2013-02-01  7:43 ` [Bug middle-end/56167] " jakub at gcc dot gnu.org
2013-02-01  7:52 ` jakub at gcc dot gnu.org
2013-02-01  7:55 ` jakub at gcc dot gnu.org
2013-02-01 16:22 ` d.g.gorbachev at gmail dot com
2013-02-05  8:08 ` jakub at gcc dot gnu.org
2013-02-05  8:11 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).