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
* [Bug middle-end/56167] ICE with invalid __attribute__ arguments
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 ` jakub at gcc dot gnu.org
2013-02-01 7:52 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-02-01 7:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56167
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-01 07:43:11 UTC ---
Your gcc is too old. There is no ICE on the first testcase anymore.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/56167] ICE with invalid __attribute__ arguments
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
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-02-01 7:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56167
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-02-01
Target Milestone|--- |4.8.0
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/56167] ICE with invalid __attribute__ arguments
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
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-02-01 7:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56167
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-01 07:54:48 UTC ---
Created attachment 29327
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29327
gcc48-pr56167.patch
Fix for the attribute warning/error ICEs. No idea why you consider the rest as
bugs.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/56167] ICE with invalid __attribute__ arguments
2013-02-01 1:50 [Bug middle-end/56167] New: ICE with invalid __attribute__ arguments d.g.gorbachev at gmail dot com
` (2 preceding siblings ...)
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
5 siblings, 0 replies; 7+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2013-02-01 16:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56167
--- Comment #3 from Dmitry Gorbachev <d.g.gorbachev at gmail dot com> 2013-02-01 16:21:58 UTC ---
> No idea why you consider the rest as bugs.
The diagnostic messages are somewhat confusing. I believe that `weakref', by
analogy with `alias', should give:
bug.c:1:1: error: attribute 'weakref' argument not a string
And the same can be said about `section'.
In regard to `alloc_size', I think it could report something like:
1.c:1:1: error: 'alloc_size' parameter is not an integer constant
Needless to say, all these things are not of the utmost importance...
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/56167] ICE with invalid __attribute__ arguments
2013-02-01 1:50 [Bug middle-end/56167] New: ICE with invalid __attribute__ arguments d.g.gorbachev at gmail dot com
` (3 preceding siblings ...)
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
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-02-05 8:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56167
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-05 08:08:33 UTC ---
Author: jakub
Date: Tue Feb 5 08:08:27 2013
New Revision: 195748
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195748
Log:
PR middle-end/56167
* c-common.c (handle_error_attribute): Fix condition.
* gcc.dg/pr56167.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/pr56167.c
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-common.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/56167] ICE with invalid __attribute__ arguments
2013-02-01 1:50 [Bug middle-end/56167] New: ICE with invalid __attribute__ arguments d.g.gorbachev at gmail dot com
` (4 preceding siblings ...)
2013-02-05 8:08 ` jakub at gcc dot gnu.org
@ 2013-02-05 8:11 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-02-05 8:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56167
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-05 08:10:39 UTC ---
Fixed.
^ 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).