public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/30297]  New: [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance
@ 2006-12-26 11:20 reichelt at gcc dot gnu dot org
  2006-12-26 11:21 ` [Bug c++/30297] " reichelt at gcc dot gnu dot org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-12-26 11:20 UTC (permalink / raw)
  To: gcc-bugs

The following (IMHO valid) code snippet triggers an ICE since GCC 4.1.0:

==================================
struct A
{
  int i;
};

extern "C" struct B : A
{
  A::i;
};
==================================

bug.cc:7: internal compiler error: tree check: expected tree that contains
'decl with visibility' structure, have 'field_decl'  in decl_linkage, at
cp/tree.c:2225
Please submit a full bug report, [etc.]


-- 
           Summary: [4.1/4.2/4.3 regression] ICE with extern "C" and
                    inheritance
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-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=30297


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

* [Bug c++/30297] [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance
  2006-12-26 11:20 [Bug c++/30297] New: [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance reichelt at gcc dot gnu dot org
@ 2006-12-26 11:21 ` reichelt at gcc dot gnu dot org
  2006-12-26 22:32 ` pinskia at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-12-26 11:21 UTC (permalink / raw)
  To: gcc-bugs



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.1.2


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


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

* [Bug c++/30297] [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance
  2006-12-26 11:20 [Bug c++/30297] New: [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance reichelt at gcc dot gnu dot org
  2006-12-26 11:21 ` [Bug c++/30297] " reichelt at gcc dot gnu dot org
@ 2006-12-26 22:32 ` pinskia at gcc dot gnu dot org
  2006-12-27  4:02 ` pinskia at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-26 22:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-12-26 22:32 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-12-26 22:32:09
               date|                            |


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


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

* [Bug c++/30297] [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance
  2006-12-26 11:20 [Bug c++/30297] New: [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance reichelt at gcc dot gnu dot org
  2006-12-26 11:21 ` [Bug c++/30297] " reichelt at gcc dot gnu dot org
  2006-12-26 22:32 ` pinskia at gcc dot gnu dot org
@ 2006-12-27  4:02 ` pinskia at gcc dot gnu dot org
  2007-01-10 21:29 ` pinskia at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-27  4:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-12-27 04:01 -------
And another one:
Index: tree.c
===================================================================
--- tree.c      (revision 120211)
+++ tree.c      (working copy)
@@ -2199,6 +2199,10 @@
      then handles a few special cases.  Ideally, we would calculate
      linkage first, and then transform that into a concrete
      implementation.  */
+     
+  /* Field decls have no linkage.  */
+  if (TREE_CODE (decl) == FIELD_DECL)
+    return lk_none;

   /* Things that don't have names have no linkage.  */
   if (!DECL_NAME (decl))


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2006-12-26 22:32:09         |2006-12-27 04:01:52
               date|                            |


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


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

* [Bug c++/30297] [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance
  2006-12-26 11:20 [Bug c++/30297] New: [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-12-27  4:02 ` pinskia at gcc dot gnu dot org
@ 2007-01-10 21:29 ` pinskia at gcc dot gnu dot org
  2007-01-25  6:07 ` mmitchel at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-01-10 21:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2007-01-10 21:28 -------
Testing a better patch.


-- 


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


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

* [Bug c++/30297] [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance
  2006-12-26 11:20 [Bug c++/30297] New: [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2007-01-10 21:29 ` pinskia at gcc dot gnu dot org
@ 2007-01-25  6:07 ` mmitchel at gcc dot gnu dot org
  2007-02-14  9:19 ` mmitchel at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-01-25  6:07 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

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


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


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

* [Bug c++/30297] [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance
  2006-12-26 11:20 [Bug c++/30297] New: [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2007-01-25  6:07 ` mmitchel at gcc dot gnu dot org
@ 2007-02-14  9:19 ` mmitchel at gcc dot gnu dot org
  2007-05-27 19:40 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-14  9:19 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.2                       |4.1.3


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


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

* [Bug c++/30297] [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance
  2006-12-26 11:20 [Bug c++/30297] New: [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2007-02-14  9:19 ` mmitchel at gcc dot gnu dot org
@ 2007-05-27 19:40 ` pinskia at gcc dot gnu dot org
  2007-11-05 20:55 ` tromey at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-27 19:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2007-05-27 19:40 -------
I can no longer remember my better patch so I am unassigning this.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|pinskia at gcc dot gnu dot  |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW


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


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

* [Bug c++/30297] [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance
  2006-12-26 11:20 [Bug c++/30297] New: [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2007-05-27 19:40 ` pinskia at gcc dot gnu dot org
@ 2007-11-05 20:55 ` tromey at gcc dot gnu dot org
  2007-11-05 22:23 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-11-05 20:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from tromey at gcc dot gnu dot org  2007-11-05 20:54 -------
What did you think was wrong with this patch?


-- 


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


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

* [Bug c++/30297] [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance
  2006-12-26 11:20 [Bug c++/30297] New: [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance reichelt at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2007-11-05 20:55 ` tromey at gcc dot gnu dot org
@ 2007-11-05 22:23 ` pinskia at gcc dot gnu dot org
  2007-11-08 19:51 ` [Bug c++/30297] [4.1/4.2 " tromey at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-11-05 22:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2007-11-05 22:23 -------
(In reply to comment #5)
> What did you think was wrong with this patch?

I cannot remember any of the details any more since it has been almost a year
since I last worked on this bug.  Sorry.


-- 


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


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

* [Bug c++/30297] [4.1/4.2 regression] ICE with extern "C" and inheritance
  2006-12-26 11:20 [Bug c++/30297] New: [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance reichelt at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2007-11-05 22:23 ` pinskia at gcc dot gnu dot org
@ 2007-11-08 19:51 ` tromey at gcc dot gnu dot org
  2007-11-08 19:51 ` [Bug c++/30297] [4.1/4.2/4.3 " tromey at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-11-08 19:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from tromey at gcc dot gnu dot org  2007-11-08 19:51 -------
Fixed on trunk.


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.3.0
            Summary|[4.1/4.2/4.3 regression] ICE|[4.1/4.2 regression] ICE
                   |with extern "C" and         |with extern "C" and
                   |inheritance                 |inheritance


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


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

* [Bug c++/30297] [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance
  2006-12-26 11:20 [Bug c++/30297] New: [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance reichelt at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2007-11-08 19:51 ` [Bug c++/30297] [4.1/4.2 " tromey at gcc dot gnu dot org
@ 2007-11-08 19:51 ` tromey at gcc dot gnu dot org
  2007-11-10  3:55 ` [Bug c++/30297] [4.1/4.2 " patchapp at dberlin dot org
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-11-08 19:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from tromey at gcc dot gnu dot org  2007-11-08 19:50 -------
Subject: Bug 30297

Author: tromey
Date: Thu Nov  8 19:50:38 2007
New Revision: 130018

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130018
Log:
gcc/cp
2007-11-08  Andrew Pinski  <pinskia@gmail.com>
        PR c++/30297:
        * tree.c (decl_linkage): Fields have no linkage.
gcc/testsuite
        PR c++/30297:
        * g++.dg/inherit/pr30297.C: New file.

Added:
    trunk/gcc/testsuite/g++.dg/inherit/pr30297.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/tree.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/30297] [4.1/4.2 regression] ICE with extern "C" and inheritance
  2006-12-26 11:20 [Bug c++/30297] New: [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance reichelt at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2007-11-08 19:51 ` [Bug c++/30297] [4.1/4.2/4.3 " tromey at gcc dot gnu dot org
@ 2007-11-10  3:55 ` patchapp at dberlin dot org
  2007-11-10  4:00 ` patchapp at dberlin dot org
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: patchapp at dberlin dot org @ 2007-11-10  3:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from patchapp at dberlin dot org  2007-11-10 03:55 -------
Subject: Bug number PR c++/30297

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-11/msg00435.html


-- 


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


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

* [Bug c++/30297] [4.1/4.2 regression] ICE with extern "C" and inheritance
  2006-12-26 11:20 [Bug c++/30297] New: [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance reichelt at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2007-11-10  3:55 ` [Bug c++/30297] [4.1/4.2 " patchapp at dberlin dot org
@ 2007-11-10  4:00 ` patchapp at dberlin dot org
  2007-11-10  4:06 ` patchapp at dberlin dot org
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: patchapp at dberlin dot org @ 2007-11-10  4:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from patchapp at dberlin dot org  2007-11-10 04:00 -------
Subject: Bug number PR c++/30297

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-11/msg00435.html


-- 


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


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

* [Bug c++/30297] [4.1/4.2 regression] ICE with extern "C" and inheritance
  2006-12-26 11:20 [Bug c++/30297] New: [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance reichelt at gcc dot gnu dot org
                   ` (12 preceding siblings ...)
  2007-11-10  4:00 ` patchapp at dberlin dot org
@ 2007-11-10  4:06 ` patchapp at dberlin dot org
  2008-07-04 21:47 ` [Bug c++/30297] [4.2 " jsm28 at gcc dot gnu dot org
  2009-03-30 20:19 ` jsm28 at gcc dot gnu dot org
  15 siblings, 0 replies; 17+ messages in thread
From: patchapp at dberlin dot org @ 2007-11-10  4:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from patchapp at dberlin dot org  2007-11-10 04:05 -------
Subject: Bug number PR c++/30297

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-11/msg00435.html


-- 


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


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

* [Bug c++/30297] [4.2 regression] ICE with extern "C" and inheritance
  2006-12-26 11:20 [Bug c++/30297] New: [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance reichelt at gcc dot gnu dot org
                   ` (13 preceding siblings ...)
  2007-11-10  4:06 ` patchapp at dberlin dot org
@ 2008-07-04 21:47 ` jsm28 at gcc dot gnu dot org
  2009-03-30 20:19 ` jsm28 at gcc dot gnu dot org
  15 siblings, 0 replies; 17+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 21:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from jsm28 at gcc dot gnu dot org  2008-07-04 21:46 -------
Closing 4.1 branch.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.1/4.2 regression] ICE    |[4.2 regression] ICE with
                   |with extern "C" and         |extern "C" and inheritance
                   |inheritance                 |
   Target Milestone|4.1.3                       |4.2.5


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


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

* [Bug c++/30297] [4.2 regression] ICE with extern "C" and inheritance
  2006-12-26 11:20 [Bug c++/30297] New: [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance reichelt at gcc dot gnu dot org
                   ` (14 preceding siblings ...)
  2008-07-04 21:47 ` [Bug c++/30297] [4.2 " jsm28 at gcc dot gnu dot org
@ 2009-03-30 20:19 ` jsm28 at gcc dot gnu dot org
  15 siblings, 0 replies; 17+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-30 20:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from jsm28 at gcc dot gnu dot org  2009-03-30 20:18 -------
Closing 4.2 branch, fixed in 4.3.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
      Known to fail|                            |4.2.5
         Resolution|                            |FIXED
   Target Milestone|4.2.5                       |4.3.0


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


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

end of thread, other threads:[~2009-03-30 20:19 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-26 11:20 [Bug c++/30297] New: [4.1/4.2/4.3 regression] ICE with extern "C" and inheritance reichelt at gcc dot gnu dot org
2006-12-26 11:21 ` [Bug c++/30297] " reichelt at gcc dot gnu dot org
2006-12-26 22:32 ` pinskia at gcc dot gnu dot org
2006-12-27  4:02 ` pinskia at gcc dot gnu dot org
2007-01-10 21:29 ` pinskia at gcc dot gnu dot org
2007-01-25  6:07 ` mmitchel at gcc dot gnu dot org
2007-02-14  9:19 ` mmitchel at gcc dot gnu dot org
2007-05-27 19:40 ` pinskia at gcc dot gnu dot org
2007-11-05 20:55 ` tromey at gcc dot gnu dot org
2007-11-05 22:23 ` pinskia at gcc dot gnu dot org
2007-11-08 19:51 ` [Bug c++/30297] [4.1/4.2 " tromey at gcc dot gnu dot org
2007-11-08 19:51 ` [Bug c++/30297] [4.1/4.2/4.3 " tromey at gcc dot gnu dot org
2007-11-10  3:55 ` [Bug c++/30297] [4.1/4.2 " patchapp at dberlin dot org
2007-11-10  4:00 ` patchapp at dberlin dot org
2007-11-10  4:06 ` patchapp at dberlin dot org
2008-07-04 21:47 ` [Bug c++/30297] [4.2 " jsm28 at gcc dot gnu dot org
2009-03-30 20: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).