public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/35744]  New: [4.1/4.2/4.3/4.4 regression] ICE attributes for invalid types
@ 2008-03-28 21:42 reichelt at gcc dot gnu dot org
  2008-03-28 21:46 ` [Bug c/35744] " reichelt at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-03-28 21:42 UTC (permalink / raw)
  To: gcc-bugs

The following invalid code snippets triggers an ICE since GCC 4.1.0:

=========================================
struct A
{
  void x[1] __attribute__((packed));
};
=========================================

bug.c:3: error: declaration of 'x' as array of voids
bug.c:3: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in handle_packed_attribute, at c-common.c:4653
Please submit a full bug report, [etc.]


Also other attributes applied to invalid variables cause ICEs
in various places, e.g.

=================================================
typedef char x[N] __attribute__((aligned(4)));
=================================================

bug.c:1: error: 'N' undeclared here (not in a function)
bug.c:1: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in build_variant_type_copy, at tree.c:4180
Please submit a full bug report, [etc.]

=================================================
void x[1] __attribute__((vector_size(8)));
=================================================

bug.c:1: error: declaration of 'x' as array of voids
bug.c:1: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in handle_vector_size_attribute, at c-common.c:6070
Please submit a full bug report, [etc.]

=================================================
void x[1] __attribute__((may_alias));
=================================================

bug.c:1: error: declaration of 'x' as array of voids
bug.c:1: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in decl_attributes, at attribs.c:355
Please submit a full bug report, [etc.]


-- 
           Summary: [4.1/4.2/4.3/4.4 regression] ICE attributes for invalid
                    types
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery, monitored
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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


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

* [Bug c/35744] [4.1/4.2/4.3/4.4 regression] ICE attributes for invalid types
  2008-03-28 21:42 [Bug c/35744] New: [4.1/4.2/4.3/4.4 regression] ICE attributes for invalid types reichelt at gcc dot gnu dot org
@ 2008-03-28 21:46 ` reichelt at gcc dot gnu dot org
  2008-04-11  6:57 ` reichelt at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-03-28 21:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from reichelt at gcc dot gnu dot org  2008-03-28 21:45 -------
Mine.

Patch here: http://gcc.gnu.org/ml/gcc-patches/2008-03/msg01822.html


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |reichelt at gcc dot gnu dot
                   |dot org                     |org
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2008-
                   |                            |03/msg01822.html
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-03-28 21:45:42
               date|                            |
   Target Milestone|---                         |4.1.3


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


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

* [Bug c/35744] [4.1/4.2/4.3/4.4 regression] ICE attributes for invalid types
  2008-03-28 21:42 [Bug c/35744] New: [4.1/4.2/4.3/4.4 regression] ICE attributes for invalid types reichelt at gcc dot gnu dot org
  2008-03-28 21:46 ` [Bug c/35744] " reichelt at gcc dot gnu dot org
@ 2008-04-11  6:57 ` reichelt at gcc dot gnu dot org
  2008-04-12  9:24 ` [Bug c/35744] [4.1/4.2/4.3 " reichelt at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-04-11  6:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from reichelt at gcc dot gnu dot org  2008-04-11 06:56 -------
Subject: Bug 35744

Author: reichelt
Date: Fri Apr 11 06:55:38 2008
New Revision: 134193

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134193
Log:
        PR c/35744
        * attribs.c (decl_attributes): Return early on errorneous node.

        * gcc.dg/attr-error-1.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/attr-error-1.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/attribs.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c/35744] [4.1/4.2/4.3 regression] ICE attributes for invalid types
  2008-03-28 21:42 [Bug c/35744] New: [4.1/4.2/4.3/4.4 regression] ICE attributes for invalid types reichelt at gcc dot gnu dot org
  2008-03-28 21:46 ` [Bug c/35744] " reichelt at gcc dot gnu dot org
  2008-04-11  6:57 ` reichelt at gcc dot gnu dot org
@ 2008-04-12  9:24 ` reichelt at gcc dot gnu dot org
  2008-04-15  9:33 ` jakub at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-04-12  9:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from reichelt at gcc dot gnu dot org  2008-04-12 09:23 -------
Fixed on mainline.


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.1/4.2/4.3/4.4 regression]|[4.1/4.2/4.3 regression] ICE
                   |ICE attributes for invalid  |attributes for invalid types
                   |types                       |


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


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

* [Bug c/35744] [4.1/4.2/4.3 regression] ICE attributes for invalid types
  2008-03-28 21:42 [Bug c/35744] New: [4.1/4.2/4.3/4.4 regression] ICE attributes for invalid types reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2008-04-12  9:24 ` [Bug c/35744] [4.1/4.2/4.3 " reichelt at gcc dot gnu dot org
@ 2008-04-15  9:33 ` jakub at gcc dot gnu dot org
  2008-04-17 19:36 ` reichelt at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-04-15  9:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jakub at gcc dot gnu dot org  2008-04-15 09:33 -------
IMHO this should be backported to gcc-4_3-branch.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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


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

* [Bug c/35744] [4.1/4.2/4.3 regression] ICE attributes for invalid types
  2008-03-28 21:42 [Bug c/35744] New: [4.1/4.2/4.3/4.4 regression] ICE attributes for invalid types reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2008-04-15  9:33 ` jakub at gcc dot gnu dot org
@ 2008-04-17 19:36 ` reichelt at gcc dot gnu dot org
  2008-04-17 19:43 ` reichelt at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-04-17 19:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from reichelt at gcc dot gnu dot org  2008-04-17 19:35 -------
Subject: Bug 35744

Author: reichelt
Date: Thu Apr 17 19:34:43 2008
New Revision: 134406

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134406
Log:
        PR c/35744
        * attribs.c (decl_attributes): Return early on errorneous node.

        * gcc.dg/attr-error-1.c: New test.

Added:
    branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/attr-error-1.c
Modified:
    branches/gcc-4_3-branch/gcc/ChangeLog
    branches/gcc-4_3-branch/gcc/attribs.c
    branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c/35744] [4.1/4.2/4.3 regression] ICE attributes for invalid types
  2008-03-28 21:42 [Bug c/35744] New: [4.1/4.2/4.3/4.4 regression] ICE attributes for invalid types reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2008-04-17 19:36 ` reichelt at gcc dot gnu dot org
@ 2008-04-17 19:43 ` reichelt at gcc dot gnu dot org
  2008-04-17 19:49 ` [Bug c/35744] [4.1 " reichelt at gcc dot gnu dot org
  2008-07-04 16:19 ` jsm28 at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-04-17 19:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from reichelt at gcc dot gnu dot org  2008-04-17 19:42 -------
Subject: Bug 35744

Author: reichelt
Date: Thu Apr 17 19:41:50 2008
New Revision: 134409

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134409
Log:
        PR c/35744
        * attribs.c (decl_attributes): Return early on errorneous node.

        * gcc.dg/attr-error-1.c: New test.

Added:
    branches/gcc-4_2-branch/gcc/testsuite/gcc.dg/attr-error-1.c
Modified:
    branches/gcc-4_2-branch/gcc/ChangeLog
    branches/gcc-4_2-branch/gcc/attribs.c
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c/35744] [4.1 regression] ICE attributes for invalid types
  2008-03-28 21:42 [Bug c/35744] New: [4.1/4.2/4.3/4.4 regression] ICE attributes for invalid types reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2008-04-17 19:43 ` reichelt at gcc dot gnu dot org
@ 2008-04-17 19:49 ` reichelt at gcc dot gnu dot org
  2008-07-04 16:19 ` jsm28 at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-04-17 19:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from reichelt at gcc dot gnu dot org  2008-04-17 19:48 -------
Now also fixed on 4.3 and 4.2 branch.


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|reichelt at gcc dot gnu dot |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW
            Summary|[4.1/4.2/4.3 regression] ICE|[4.1 regression] ICE
                   |attributes for invalid types|attributes for invalid types


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


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

* [Bug c/35744] [4.1 regression] ICE attributes for invalid types
  2008-03-28 21:42 [Bug c/35744] New: [4.1/4.2/4.3/4.4 regression] ICE attributes for invalid types reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2008-04-17 19:49 ` [Bug c/35744] [4.1 " reichelt at gcc dot gnu dot org
@ 2008-07-04 16:19 ` jsm28 at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 16:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jsm28 at gcc dot gnu dot org  2008-07-04 16:19 -------
Closing 4.1 branch.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
      Known to fail|                            |4.1.3
      Known to work|                            |4.2.4
         Resolution|                            |FIXED
   Target Milestone|4.1.3                       |4.2.4


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


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

end of thread, other threads:[~2008-07-04 16:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-28 21:42 [Bug c/35744] New: [4.1/4.2/4.3/4.4 regression] ICE attributes for invalid types reichelt at gcc dot gnu dot org
2008-03-28 21:46 ` [Bug c/35744] " reichelt at gcc dot gnu dot org
2008-04-11  6:57 ` reichelt at gcc dot gnu dot org
2008-04-12  9:24 ` [Bug c/35744] [4.1/4.2/4.3 " reichelt at gcc dot gnu dot org
2008-04-15  9:33 ` jakub at gcc dot gnu dot org
2008-04-17 19:36 ` reichelt at gcc dot gnu dot org
2008-04-17 19:43 ` reichelt at gcc dot gnu dot org
2008-04-17 19:49 ` [Bug c/35744] [4.1 " reichelt at gcc dot gnu dot org
2008-07-04 16:19 ` jsm28 at gcc dot gnu dot 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).