public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/54744] New: internal compiler error: Segmentation fault, by dependent base, member typedef and ctor-initializer
@ 2012-09-29  9:10 ai.azuma at gmail dot com
  2012-09-29 11:05 ` [Bug c++/54744] " paolo.carlini at oracle dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: ai.azuma at gmail dot com @ 2012-09-29  9:10 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 54744
           Summary: internal compiler error: Segmentation fault, by
                    dependent base, member typedef and ctor-initializer
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ai.azuma@gmail.com


Created attachment 28298
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28298
Output of -v option and preprocessed file

The following valid code causes segfault with GCC 4.8.0 20120916 and GCC 4.7.3
20120922.

///////////////////////////////////////////////////////////
template <typename T>
struct base {
  typedef base base_type;
};

template <typename T>
struct derived : base<T> {
  typedef typename derived::base_type::base_type base_type;
  derived() : base_type() {}
};
///////////////////////////////////////////////////////////

Note that the above code compiles successfully with GCC 4.6.4 20120921.


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

* [Bug c++/54744] internal compiler error: Segmentation fault, by dependent base, member typedef and ctor-initializer
  2012-09-29  9:10 [Bug c++/54744] New: internal compiler error: Segmentation fault, by dependent base, member typedef and ctor-initializer ai.azuma at gmail dot com
@ 2012-09-29 11:05 ` paolo.carlini at oracle dot com
  2012-09-29 12:59 ` jakub at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-09-29 11:05 UTC (permalink / raw)
  To: gcc-bugs


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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl at gcc dot gnu.org

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-09-29 11:05:15 UTC ---
H.J. can you help finding which change broke this?


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

* [Bug c++/54744] internal compiler error: Segmentation fault, by dependent base, member typedef and ctor-initializer
  2012-09-29  9:10 [Bug c++/54744] New: internal compiler error: Segmentation fault, by dependent base, member typedef and ctor-initializer ai.azuma at gmail dot com
  2012-09-29 11:05 ` [Bug c++/54744] " paolo.carlini at oracle dot com
@ 2012-09-29 12:59 ` jakub at gcc dot gnu.org
  2012-09-29 18:25 ` [Bug c++/54744] [4.7/4.8 Regression] " paolo.carlini at oracle dot com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-29 12:59 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-29 12:58:44 UTC ---
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182012


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

* [Bug c++/54744] [4.7/4.8 Regression] internal compiler error: Segmentation fault, by dependent base, member typedef and ctor-initializer
  2012-09-29  9:10 [Bug c++/54744] New: internal compiler error: Segmentation fault, by dependent base, member typedef and ctor-initializer ai.azuma at gmail dot com
  2012-09-29 11:05 ` [Bug c++/54744] " paolo.carlini at oracle dot com
  2012-09-29 12:59 ` jakub at gcc dot gnu.org
@ 2012-09-29 18:25 ` paolo.carlini at oracle dot com
  2012-11-25 15:55 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-09-29 18:25 UTC (permalink / raw)
  To: gcc-bugs


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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-09-29
            Summary|internal compiler error:    |[4.7/4.8 Regression]
                   |Segmentation fault, by      |internal compiler error:
                   |dependent base, member      |Segmentation fault, by
                   |typedef and                 |dependent base, member
                   |ctor-initializer            |typedef and
                   |                            |ctor-initializer
     Ever Confirmed|0                           |1

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-09-29 18:25:21 UTC ---
Thanks Jakub. Looks like this is a regression.


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

* [Bug c++/54744] [4.7/4.8 Regression] internal compiler error: Segmentation fault, by dependent base, member typedef and ctor-initializer
  2012-09-29  9:10 [Bug c++/54744] New: internal compiler error: Segmentation fault, by dependent base, member typedef and ctor-initializer ai.azuma at gmail dot com
                   ` (2 preceding siblings ...)
  2012-09-29 18:25 ` [Bug c++/54744] [4.7/4.8 Regression] " paolo.carlini at oracle dot com
@ 2012-11-25 15:55 ` rguenth at gcc dot gnu.org
  2012-11-29 11:39 ` paolo.carlini at oracle dot com
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-11-25 15:55 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.3


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

* [Bug c++/54744] [4.7/4.8 Regression] internal compiler error: Segmentation fault, by dependent base, member typedef and ctor-initializer
  2012-09-29  9:10 [Bug c++/54744] New: internal compiler error: Segmentation fault, by dependent base, member typedef and ctor-initializer ai.azuma at gmail dot com
                   ` (3 preceding siblings ...)
  2012-11-25 15:55 ` rguenth at gcc dot gnu.org
@ 2012-11-29 11:39 ` paolo.carlini at oracle dot com
  2012-12-03 15:45 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-11-29 11:39 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-11-29 11:38:42 UTC ---
Infinite recursion in resolve_typename_type, between the two recursive calls
inside it.


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

* [Bug c++/54744] [4.7/4.8 Regression] internal compiler error: Segmentation fault, by dependent base, member typedef and ctor-initializer
  2012-09-29  9:10 [Bug c++/54744] New: internal compiler error: Segmentation fault, by dependent base, member typedef and ctor-initializer ai.azuma at gmail dot com
                   ` (4 preceding siblings ...)
  2012-11-29 11:39 ` paolo.carlini at oracle dot com
@ 2012-12-03 15:45 ` rguenth at gcc dot gnu.org
  2012-12-06 15:52 ` jason at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-12-03 15:45 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

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


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

* [Bug c++/54744] [4.7/4.8 Regression] internal compiler error: Segmentation fault, by dependent base, member typedef and ctor-initializer
  2012-09-29  9:10 [Bug c++/54744] New: internal compiler error: Segmentation fault, by dependent base, member typedef and ctor-initializer ai.azuma at gmail dot com
                   ` (5 preceding siblings ...)
  2012-12-03 15:45 ` rguenth at gcc dot gnu.org
@ 2012-12-06 15:52 ` jason at gcc dot gnu.org
  2012-12-06 20:22 ` jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2012-12-06 15:52 UTC (permalink / raw)
  To: gcc-bugs


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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |jason at gcc dot gnu.org
         AssignedTo|unassigned at gcc dot       |jason at gcc dot gnu.org
                   |gnu.org                     |


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

* [Bug c++/54744] [4.7/4.8 Regression] internal compiler error: Segmentation fault, by dependent base, member typedef and ctor-initializer
  2012-09-29  9:10 [Bug c++/54744] New: internal compiler error: Segmentation fault, by dependent base, member typedef and ctor-initializer ai.azuma at gmail dot com
                   ` (6 preceding siblings ...)
  2012-12-06 15:52 ` jason at gcc dot gnu.org
@ 2012-12-06 20:22 ` jason at gcc dot gnu.org
  2012-12-06 20:23 ` jason at gcc dot gnu.org
  2012-12-06 20:23 ` jason at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2012-12-06 20:22 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> 2012-12-06 20:21:21 UTC ---
Author: jason
Date: Thu Dec  6 20:21:08 2012
New Revision: 194267

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194267
Log:
    PR c++/54744
    * pt.c (resolve_typename_type): Check TYPENAME_IS_RESOLVING_P on scope.
    * init.c (expand_member_init): Check for being in a template first.
    * parser.c (cp_parser_mem_initializer_list): Only check class types
    for equivalence to the current class.

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


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

* [Bug c++/54744] [4.7/4.8 Regression] internal compiler error: Segmentation fault, by dependent base, member typedef and ctor-initializer
  2012-09-29  9:10 [Bug c++/54744] New: internal compiler error: Segmentation fault, by dependent base, member typedef and ctor-initializer ai.azuma at gmail dot com
                   ` (8 preceding siblings ...)
  2012-12-06 20:23 ` jason at gcc dot gnu.org
@ 2012-12-06 20:23 ` jason at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2012-12-06 20:23 UTC (permalink / raw)
  To: gcc-bugs


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

Jason Merrill <jason at gcc dot gnu.org> changed:

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

--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> 2012-12-06 20:22:44 UTC ---
Fixed for 4.7.3.


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

* [Bug c++/54744] [4.7/4.8 Regression] internal compiler error: Segmentation fault, by dependent base, member typedef and ctor-initializer
  2012-09-29  9:10 [Bug c++/54744] New: internal compiler error: Segmentation fault, by dependent base, member typedef and ctor-initializer ai.azuma at gmail dot com
                   ` (7 preceding siblings ...)
  2012-12-06 20:22 ` jason at gcc dot gnu.org
@ 2012-12-06 20:23 ` jason at gcc dot gnu.org
  2012-12-06 20:23 ` jason at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2012-12-06 20:23 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> 2012-12-06 20:21:58 UTC ---
Author: jason
Date: Thu Dec  6 20:21:44 2012
New Revision: 194269

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194269
Log:
    PR c++/54744
    * pt.c (resolve_typename_type): Check TYPENAME_IS_RESOLVING_P on scope.

Added:
    branches/gcc-4_7-branch/gcc/testsuite/g++.dg/template/meminit3.C
Modified:
    branches/gcc-4_7-branch/gcc/cp/ChangeLog
    branches/gcc-4_7-branch/gcc/cp/pt.c


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

end of thread, other threads:[~2012-12-06 20:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-29  9:10 [Bug c++/54744] New: internal compiler error: Segmentation fault, by dependent base, member typedef and ctor-initializer ai.azuma at gmail dot com
2012-09-29 11:05 ` [Bug c++/54744] " paolo.carlini at oracle dot com
2012-09-29 12:59 ` jakub at gcc dot gnu.org
2012-09-29 18:25 ` [Bug c++/54744] [4.7/4.8 Regression] " paolo.carlini at oracle dot com
2012-11-25 15:55 ` rguenth at gcc dot gnu.org
2012-11-29 11:39 ` paolo.carlini at oracle dot com
2012-12-03 15:45 ` rguenth at gcc dot gnu.org
2012-12-06 15:52 ` jason at gcc dot gnu.org
2012-12-06 20:22 ` jason at gcc dot gnu.org
2012-12-06 20:23 ` jason at gcc dot gnu.org
2012-12-06 20:23 ` jason 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).