public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/35434]  New: [4.2/4.3/4.4 regression] ICE with attribute alias/weakref
@ 2008-03-03 20:38 reichelt at gcc dot gnu dot org
  2008-03-03 20:39 ` [Bug c/35434] " reichelt at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-03-03 20:38 UTC (permalink / raw)
  To: gcc-bugs

The following invalid code snippet triggers an ICE since GCC 4.2.0:

===============================================
typedef int i __attribute__((alias("j")));
===============================================

bug.c:1: internal compiler error: in make_decl_rtl, at varasm.c:1267
Please submit a full bug report, [etc.]

Before GCC 4.2.0 we got the error:
bug.c:1: error: 'i' defined both normally and as an alias


A similar code snippet causes a crash in a different location:

===============================================
typedef int i __attribute__((weakref("j")));
===============================================

bug.c:1: internal compiler error: in lhd_set_decl_assembler_name, at
langhooks.c:160
Please submit a full bug report, [etc.]

Before GCC 4.2.0 we got the error:
bug.c:1: error: weak declaration of 'i' must be public
bug.c:1: error: 'i' defined both normally and as an alias


-- 
           Summary: [4.2/4.3/4.4 regression] ICE with attribute
                    alias/weakref
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, 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=35434


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

* [Bug c/35434] [4.2/4.3/4.4 regression] ICE with attribute alias/weakref
  2008-03-03 20:38 [Bug c/35434] New: [4.2/4.3/4.4 regression] ICE with attribute alias/weakref reichelt at gcc dot gnu dot org
@ 2008-03-03 20:39 ` reichelt at gcc dot gnu dot org
  2008-03-15  1:31 ` jsm28 at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-03-03 20:39 UTC (permalink / raw)
  To: gcc-bugs



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.2.4


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


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

* [Bug c/35434] [4.2/4.3/4.4 regression] ICE with attribute alias/weakref
  2008-03-03 20:38 [Bug c/35434] New: [4.2/4.3/4.4 regression] ICE with attribute alias/weakref reichelt at gcc dot gnu dot org
  2008-03-03 20:39 ` [Bug c/35434] " reichelt at gcc dot gnu dot org
@ 2008-03-15  1:31 ` jsm28 at gcc dot gnu dot org
  2008-05-19 20:34 ` jsm28 at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-03-15  1:31 UTC (permalink / raw)
  To: gcc-bugs



-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Priority|P3                          |P4
   Last reconfirmed|0000-00-00 00:00:00         |2008-03-15 01:31:08
               date|                            |


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


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

* [Bug c/35434] [4.2/4.3/4.4 regression] ICE with attribute alias/weakref
  2008-03-03 20:38 [Bug c/35434] New: [4.2/4.3/4.4 regression] ICE with attribute alias/weakref reichelt at gcc dot gnu dot org
  2008-03-03 20:39 ` [Bug c/35434] " reichelt at gcc dot gnu dot org
  2008-03-15  1:31 ` jsm28 at gcc dot gnu dot org
@ 2008-05-19 20:34 ` jsm28 at gcc dot gnu dot org
  2008-09-30 21:35 ` [Bug c/35434] [4.2/4.3/4.4 regression] ICE with attribute alias reichelt at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-05-19 20:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jsm28 at gcc dot gnu dot org  2008-05-19 20:25 -------
4.2.4 is being released, changing milestones to 4.2.5.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.4                       |4.2.5


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


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

* [Bug c/35434] [4.2/4.3/4.4 regression] ICE with attribute alias
  2008-03-03 20:38 [Bug c/35434] New: [4.2/4.3/4.4 regression] ICE with attribute alias/weakref reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2008-05-19 20:34 ` jsm28 at gcc dot gnu dot org
@ 2008-09-30 21:35 ` reichelt at gcc dot gnu dot org
  2009-02-06 20:37 ` jsm28 at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-09-30 21:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from reichelt at gcc dot gnu dot org  2008-09-30 21:33 -------
The second (weakref) case has been fixed on mainline and the 4.3 branch
by the patch for PR37645. The attribute is ignored and the code compiled:

bug.c:1: warning: 'weakref' attribute ignored

The first (alias) case still crashes, though.


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.2/4.3/4.4 regression] ICE|[4.2/4.3/4.4 regression] ICE
                   |with attribute alias/weakref|with attribute alias


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


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

* [Bug c/35434] [4.2/4.3/4.4 regression] ICE with attribute alias
  2008-03-03 20:38 [Bug c/35434] New: [4.2/4.3/4.4 regression] ICE with attribute alias/weakref reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2008-09-30 21:35 ` [Bug c/35434] [4.2/4.3/4.4 regression] ICE with attribute alias reichelt at gcc dot gnu dot org
@ 2009-02-06 20:37 ` jsm28 at gcc dot gnu dot org
  2009-02-07  0:33 ` jsm28 at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-02-06 20:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jsm28 at gcc dot gnu dot org  2009-02-06 20:37 -------
Testing a patch.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jsm28 at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2008-03-15 01:31:08         |2009-02-06 20:37:18
               date|                            |


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


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

* [Bug c/35434] [4.2/4.3/4.4 regression] ICE with attribute alias
  2008-03-03 20:38 [Bug c/35434] New: [4.2/4.3/4.4 regression] ICE with attribute alias/weakref reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2009-02-06 20:37 ` jsm28 at gcc dot gnu dot org
@ 2009-02-07  0:33 ` jsm28 at gcc dot gnu dot org
  2009-02-08 19:03 ` jsm28 at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-02-07  0:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jsm28 at gcc dot gnu dot org  2009-02-07 00:33 -------
Subject: Bug 35434

Author: jsm28
Date: Sat Feb  7 00:32:37 2009
New Revision: 143998

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143998
Log:
        PR c/35434
        * c-common.c (handle_alias_attribute): Disallow attribute for
        anything not a FUNCTION_DECL or VAR_DECL.

testsuite:
        * gcc.dg/attr-alias-4.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/attr-alias-4.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-common.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c/35434] [4.2/4.3/4.4 regression] ICE with attribute alias
  2008-03-03 20:38 [Bug c/35434] New: [4.2/4.3/4.4 regression] ICE with attribute alias/weakref reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2009-02-07  0:33 ` jsm28 at gcc dot gnu dot org
@ 2009-02-08 19:03 ` jsm28 at gcc dot gnu dot org
  2009-02-08 19:04 ` [Bug c/35434] [4.2 " jsm28 at gcc dot gnu dot org
  2009-03-31 15:22 ` jsm28 at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-02-08 19:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jsm28 at gcc dot gnu dot org  2009-02-08 19:03 -------
Subject: Bug 35434

Author: jsm28
Date: Sun Feb  8 19:02:56 2009
New Revision: 144019

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=144019
Log:
        PR c/35434
        * c-common.c (handle_alias_attribute): Disallow attribute for
        anything not a FUNCTION_DECL or VAR_DECL.

testsuite:
        * gcc.dg/attr-alias-4.c: New test.

Added:
    branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/attr-alias-4.c
Modified:
    branches/gcc-4_3-branch/gcc/ChangeLog
    branches/gcc-4_3-branch/gcc/c-common.c
    branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c/35434] [4.2 regression] ICE with attribute alias
  2008-03-03 20:38 [Bug c/35434] New: [4.2/4.3/4.4 regression] ICE with attribute alias/weakref reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2009-02-08 19:03 ` jsm28 at gcc dot gnu dot org
@ 2009-02-08 19:04 ` jsm28 at gcc dot gnu dot org
  2009-03-31 15:22 ` jsm28 at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-02-08 19:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jsm28 at gcc dot gnu dot org  2009-02-08 19:04 -------
Fixed for 4.3.4 and 4.4.0.  Not planning to work on a backport to 4.2.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|jsm28 at gcc dot gnu dot org|unassigned at gcc dot gnu
                   |                            |dot org
             Status|ASSIGNED                    |NEW
            Summary|[4.2/4.3/4.4 regression] ICE|[4.2 regression] ICE with
                   |with attribute alias        |attribute alias


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


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

* [Bug c/35434] [4.2 regression] ICE with attribute alias
  2008-03-03 20:38 [Bug c/35434] New: [4.2/4.3/4.4 regression] ICE with attribute alias/weakref reichelt at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2009-02-08 19:04 ` [Bug c/35434] [4.2 " jsm28 at gcc dot gnu dot org
@ 2009-03-31 15:22 ` jsm28 at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-31 15:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jsm28 at gcc dot gnu dot org  2009-03-31 15:22 -------
Closing 4.2 branch, fixed for 4.3.4 and 4.4.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
      Known to fail|                            |4.2.5 4.3.3
      Known to work|                            |4.3.4 4.4.0
         Resolution|                            |FIXED
   Target Milestone|4.2.5                       |4.3.4


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


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

end of thread, other threads:[~2009-03-31 15:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-03 20:38 [Bug c/35434] New: [4.2/4.3/4.4 regression] ICE with attribute alias/weakref reichelt at gcc dot gnu dot org
2008-03-03 20:39 ` [Bug c/35434] " reichelt at gcc dot gnu dot org
2008-03-15  1:31 ` jsm28 at gcc dot gnu dot org
2008-05-19 20:34 ` jsm28 at gcc dot gnu dot org
2008-09-30 21:35 ` [Bug c/35434] [4.2/4.3/4.4 regression] ICE with attribute alias reichelt at gcc dot gnu dot org
2009-02-06 20:37 ` jsm28 at gcc dot gnu dot org
2009-02-07  0:33 ` jsm28 at gcc dot gnu dot org
2009-02-08 19:03 ` jsm28 at gcc dot gnu dot org
2009-02-08 19:04 ` [Bug c/35434] [4.2 " jsm28 at gcc dot gnu dot org
2009-03-31 15:22 ` 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).