public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/40557]  New: [4.5 Regression] ICE with template union
@ 2009-06-26  6:06 reichelt at gcc dot gnu dot org
  2009-06-26  6:07 ` [Bug c++/40557] " reichelt at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2009-06-26  6:06 UTC (permalink / raw)
  To: gcc-bugs

The following valid code snippet triggers an ICE on the trunk:

==============================
struct A
{
  typedef int X;
};

template<int> union B
{
  A::X x;
};
==============================

bug.cc:8:6: internal compiler error: in
append_type_to_template_for_access_check_1, at cp/pt.c:17353
Please submit a full bug report, [etc.]

The regression appeared between 2009-05-22 and 2009-06-01.
Looks like it was caused by the following patch:

2009-05-26  Dodji Seketeli  <dodji@redhat.com>

        PR c++/40007
        * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Remove this accessor.
        (TI_TYPEDEFS_NEEDING_ACCESS_CHECKING): New accessor.
        (get_types_needing_access_check): Declare new entry point.
        * pt.c (append_type_to_template_for_access_check_1,
        get_types_needing_access_check): New functions.
        [...]


-- 
           Summary: [4.5 Regression] ICE with template union
           Product: gcc
           Version: 4.5.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=40557


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

* [Bug c++/40557] [4.5 Regression] ICE with template union
  2009-06-26  6:06 [Bug c++/40557] New: [4.5 Regression] ICE with template union reichelt at gcc dot gnu dot org
@ 2009-06-26  6:07 ` reichelt at gcc dot gnu dot org
  2009-06-26  9:52 ` rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2009-06-26  6:07 UTC (permalink / raw)
  To: gcc-bugs



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.5.0


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


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

* [Bug c++/40557] [4.5 Regression] ICE with template union
  2009-06-26  6:06 [Bug c++/40557] New: [4.5 Regression] ICE with template union reichelt at gcc dot gnu dot org
  2009-06-26  6:07 ` [Bug c++/40557] " reichelt at gcc dot gnu dot org
@ 2009-06-26  9:52 ` rguenth at gcc dot gnu dot org
  2009-07-04 13:21 ` simartin at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-06-26  9:52 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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


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

* [Bug c++/40557] [4.5 Regression] ICE with template union
  2009-06-26  6:06 [Bug c++/40557] New: [4.5 Regression] ICE with template union reichelt at gcc dot gnu dot org
  2009-06-26  6:07 ` [Bug c++/40557] " reichelt at gcc dot gnu dot org
  2009-06-26  9:52 ` rguenth at gcc dot gnu dot org
@ 2009-07-04 13:21 ` simartin at gcc dot gnu dot org
  2009-07-06  4:55 ` simartin at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: simartin at gcc dot gnu dot org @ 2009-07-04 13:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from simartin at gcc dot gnu dot org  2009-07-04 13:21 -------
Patch submitted here:
  http://gcc.gnu.org/ml/gcc-patches/2009-07/msg00213.html


-- 

simartin at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simartin at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-07-04 13:21:14
               date|                            |


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


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

* [Bug c++/40557] [4.5 Regression] ICE with template union
  2009-06-26  6:06 [Bug c++/40557] New: [4.5 Regression] ICE with template union reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2009-07-04 13:21 ` simartin at gcc dot gnu dot org
@ 2009-07-06  4:55 ` simartin at gcc dot gnu dot org
  2009-07-06  5:06 ` simartin at gcc dot gnu dot org
  2009-07-08 14:31 ` hjl at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: simartin at gcc dot gnu dot org @ 2009-07-06  4:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from simartin at gcc dot gnu dot org  2009-07-06 04:55 -------
Subject: Bug 40557

Author: simartin
Date: Mon Jul  6 04:55:20 2009
New Revision: 149276

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149276
Log:
gcc/cp/

2009-07-06  Simon Martin  <simartin@users.sourceforge.net>

        PR c++/40557
        * pt.c (perform_typedefs_access_check, get_types_needing_access_check,
        append_type_to_template_for_access_check_1): Use
        RECORD_OR_UNION_CODE_P.

gcc/testsuite/

2009-07-06  Simon Martin  <simartin@users.sourceforge.net>

        PR c++/40557
        * g++.dg/template/union2.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/template/union2.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/40557] [4.5 Regression] ICE with template union
  2009-06-26  6:06 [Bug c++/40557] New: [4.5 Regression] ICE with template union reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2009-07-06  4:55 ` simartin at gcc dot gnu dot org
@ 2009-07-06  5:06 ` simartin at gcc dot gnu dot org
  2009-07-08 14:31 ` hjl at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: simartin at gcc dot gnu dot org @ 2009-07-06  5:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from simartin at gcc dot gnu dot org  2009-07-06 05:05 -------
Fixed in 4.5


-- 

simartin at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug c++/40557] [4.5 Regression] ICE with template union
  2009-06-26  6:06 [Bug c++/40557] New: [4.5 Regression] ICE with template union reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2009-07-06  5:06 ` simartin at gcc dot gnu dot org
@ 2009-07-08 14:31 ` hjl at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: hjl at gcc dot gnu dot org @ 2009-07-08 14:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from hjl at gcc dot gnu dot org  2009-07-08 14:30 -------
Subject: Bug 40557

Author: hjl
Date: Wed Jul  8 14:30:12 2009
New Revision: 149371

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149371
Log:
2009-07-08  H.J. Lu  <hongjiu.lu@intel.com>

        Backport from mainline:
        2009-07-06  Simon Martin  <simartin@users.sourceforge.net>

        PR c++/40557
        * g++.dg/template/union2.C: New test.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/template/union2.C
      - copied unchanged from r149370,
trunk/gcc/testsuite/g++.dg/template/union2.C
Modified:
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog


-- 


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


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

end of thread, other threads:[~2009-07-08 14:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-26  6:06 [Bug c++/40557] New: [4.5 Regression] ICE with template union reichelt at gcc dot gnu dot org
2009-06-26  6:07 ` [Bug c++/40557] " reichelt at gcc dot gnu dot org
2009-06-26  9:52 ` rguenth at gcc dot gnu dot org
2009-07-04 13:21 ` simartin at gcc dot gnu dot org
2009-07-06  4:55 ` simartin at gcc dot gnu dot org
2009-07-06  5:06 ` simartin at gcc dot gnu dot org
2009-07-08 14:31 ` hjl 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).