public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/22603] New: internal compiler error: in pop_binding, at cp/name-lookup.c:380
@ 2005-07-22  2:32 flash at pobox dot com
  2005-07-22  2:35 ` [Bug c++/22603] " flash at pobox dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: flash at pobox dot com @ 2005-07-22  2:32 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3219 bytes --]

The invalid code below results in "internal compiler error: in pop_binding, at cp/name-lookup.c:380" 
with a checking version of GCC 4.0.1.  Does not happen with GCC 3.3.4.

class NameOne : public static_small_value
{
 inline NameOne(T v) {
 }
{
};
template<class KEY, class VALUE>
class NameTwo : private NameThree
{
    void NameFour(const struct NameFive &cache);

This code is a greatly-reduced (and anonymized) excerpt, found by Daniel Wilkerson's Delta, from some 
real PalmSource code; I'm not sure it makes any sense at all.  The original code seemed to give a 
different compiler error, which I'll try to file separately; though it involves 16K lines of proprietary code, 
so it may have to wait for our CodeSourcery support agreement.

===========
Session:
117> /opt/gcc401chk/bin/g++ -v  /Projects/PlatformTools/compilerChain/tests/cpp/bugfiles/error/
104911_HtmlView_min.ii
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure --enable-checking --prefix=/opt/gcc401chk --enable-languages=c,c+
+
Thread model: posix
gcc version 4.0.1
 /opt/gcc401chk/libexec/gcc/i686-pc-linux-gnu/4.0.1/cc1plus -fpreprocessed /Projects/
PlatformTools/compilerChain/tests/cpp/bugfiles/error/104911_HtmlView_min.ii -quiet -dumpbase 
104911_HtmlView_min.ii -mtune=pentiumpro -auxbase 104911_HtmlView_min -version -o /tmp/
ccKTKYmH.s
GNU C++ version 4.0.1 (i686-pc-linux-gnu)
        compiled by GNU C version 3.3.4 (pre 3.3.5 20040809).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
/Projects/PlatformTools/compilerChain/tests/cpp/bugfiles/error/104911_HtmlView_min.ii:2: error: 
expected class-name before ‘{’ token
/Projects/PlatformTools/compilerChain/tests/cpp/bugfiles/error/104911_HtmlView_min.ii:3: error: 
expected `)' before ‘v’
/Projects/PlatformTools/compilerChain/tests/cpp/bugfiles/error/104911_HtmlView_min.ii:5: error: 
expected unqualified-id before ‘{’ token
/Projects/PlatformTools/compilerChain/tests/cpp/bugfiles/error/104911_HtmlView_min.ii:9: error: 
expected class-name before ‘{’ token
/Projects/PlatformTools/compilerChain/tests/cpp/bugfiles/error/104911_HtmlView_min.ii:10: error: 
expected `}' at end of input
/Projects/PlatformTools/compilerChain/tests/cpp/bugfiles/error/104911_HtmlView_min.ii:10: error: 
expected unqualified-id at end of input
/Projects/PlatformTools/compilerChain/tests/cpp/bugfiles/error/104911_HtmlView_min.ii:10: internal 
compiler error: in pop_binding, at cp/name-lookup.c:380
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


PalmSource bug 104911

-- 
           Summary: internal compiler error: in pop_binding, at cp/name-
                    lookup.c:380
           Product: gcc
           Version: 4.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: flash at pobox dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug c++/22603] internal compiler error: in pop_binding, at cp/name-lookup.c:380
  2005-07-22  2:32 [Bug c++/22603] New: internal compiler error: in pop_binding, at cp/name-lookup.c:380 flash at pobox dot com
@ 2005-07-22  2:35 ` flash at pobox dot com
  2005-07-22  2:43 ` flash at pobox dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: flash at pobox dot com @ 2005-07-22  2:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From flash at pobox dot com  2005-07-22 02:32 -------
Created an attachment (id=9326)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9326&action=view)
104911_HtmlView_min.ii


-- 


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


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

* [Bug c++/22603] internal compiler error: in pop_binding, at cp/name-lookup.c:380
  2005-07-22  2:32 [Bug c++/22603] New: internal compiler error: in pop_binding, at cp/name-lookup.c:380 flash at pobox dot com
  2005-07-22  2:35 ` [Bug c++/22603] " flash at pobox dot com
@ 2005-07-22  2:43 ` flash at pobox dot com
  2005-07-22  3:16 ` [Bug c++/22603] [4.0 Regression] " pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: flash at pobox dot com @ 2005-07-22  2:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From flash at pobox dot com  2005-07-22 02:35 -------
This sounds like bugs 9777 and 5402, but those were supposedly fixed.

-- 


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


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

* [Bug c++/22603] [4.0 Regression] internal compiler error: in pop_binding, at cp/name-lookup.c:380
  2005-07-22  2:32 [Bug c++/22603] New: internal compiler error: in pop_binding, at cp/name-lookup.c:380 flash at pobox dot com
  2005-07-22  2:35 ` [Bug c++/22603] " flash at pobox dot com
  2005-07-22  2:43 ` flash at pobox dot com
@ 2005-07-22  3:16 ` pinskia at gcc dot gnu dot org
  2005-07-22  4:03 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-22  3:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-22 02:43 -------
Confirmed, only a 4.0 regression.  We do not get an ICE on the mainline.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |error-recovery, ice-on-
                   |                            |invalid-code
   Last reconfirmed|0000-00-00 00:00:00         |2005-07-22 02:43:47
               date|                            |
            Summary|internal compiler error: in |[4.0 Regression] internal
                   |pop_binding, at cp/name-    |compiler error: in
                   |lookup.c:380                |pop_binding, at cp/name-
                   |                            |lookup.c:380
   Target Milestone|---                         |4.0.2


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


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

* [Bug c++/22603] [4.0 Regression] internal compiler error: in pop_binding, at cp/name-lookup.c:380
  2005-07-22  2:32 [Bug c++/22603] New: internal compiler error: in pop_binding, at cp/name-lookup.c:380 flash at pobox dot com
                   ` (2 preceding siblings ...)
  2005-07-22  3:16 ` [Bug c++/22603] [4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2005-07-22  4:03 ` pinskia at gcc dot gnu dot org
  2005-07-23  5:05 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-22  4:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-22 04:00 -------
I should mention this was started after 20050225 which was when the branch happened.
And here is the backtrace:
#0  fancy_abort (file=0x1197880 "../../gcc/cp/name-lookup.c", line=380, function=0x1197904 
"pop_binding") at ../../gcc/diagnostic.c:556
#1  0x001e83d0 in pop_binding (id=0x426b923c, decl=0x426b5e80) at ../../gcc/cp/name-lookup.c:
380
#2  0x00028968 in poplevel (keep=0, reverse=0, functionbody=0) at ../../gcc/cp/decl.c:650
#3  0x0002707c in finish_scope () at ../../gcc/cp/decl.c:346
#4  0x00079c34 in end_template_decl () at ../../gcc/cp/pt.c:2400
#5  0x001b6e1c in finish_template_decl (parms=0x4267c300) at ../../gcc/cp/semantics.c:2300
#6  0x00147594 in cp_parser_template_declaration_after_export (parser=0x426b92a4, member_p=1 
'\001') at ../../gcc/cp/parser.c:15038
#7  0x0013a240 in cp_parser_template_declaration (parser=0x426b92a4, member_p=1 '\001') at ../../
gcc/cp/parser.c:8154
#8  0x001436bc in cp_parser_member_declaration (parser=0x426b92a4) at ../../gcc/cp/parser.c:
13099
#9  0x00143624 in cp_parser_member_specification_opt (parser=0x426b92a4) at ../../gcc/cp/
parser.c:13040
#10 0x00141dc4 in cp_parser_class_specifier (parser=0x426b92a4) at ../../gcc/cp/parser.c:12498
#11 0x0013c8e4 in cp_parser_type_specifier (parser=0x426b92a4, 
flags=CP_PARSER_FLAGS_OPTIONAL, decl_specs=0xbffff840, is_declaration=1 '\001', 
declares_class_or_enum=0xbffff7d8, is_cv_qualifier=0xbffff7dc "") at ../../gcc/cp/parser.c:9326
#12 0x00138d18 in cp_parser_decl_specifier_seq (parser=0x426b92a4, 
flags=CP_PARSER_FLAGS_OPTIONAL, decl_specs=0xbffff840, declares_class_or_enum=0xbffff890) at ../
../gcc/cp/parser.c:7309
#13 0x00138714 in cp_parser_simple_declaration (parser=0x426b92a4, 
function_definition_allowed_p=1 '\001') at ../../gcc/cp/parser.c:7005
#14 0x001386b8 in cp_parser_block_declaration (parser=0x426b92a4, statement_p=0 '\0') at ../../
gcc/cp/parser.c:6966
#15 0x001384a0 in cp_parser_declaration (parser=0x426b92a4) at ../../gcc/cp/parser.c:6883
#16 0x001380fc in cp_parser_declaration_seq_opt (parser=0x426b92a4) at ../../gcc/cp/parser.c:6787
#17 0x00130d8c in cp_parser_translation_unit (parser=0x426b92a4) at ../../gcc/cp/parser.c:2596


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |4.1.0
      Known to work|                            |3.4.4


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


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

* [Bug c++/22603] [4.0 Regression] internal compiler error: in pop_binding, at cp/name-lookup.c:380
  2005-07-22  2:32 [Bug c++/22603] New: internal compiler error: in pop_binding, at cp/name-lookup.c:380 flash at pobox dot com
                   ` (3 preceding siblings ...)
  2005-07-22  4:03 ` pinskia at gcc dot gnu dot org
@ 2005-07-23  5:05 ` pinskia at gcc dot gnu dot org
  2005-07-25 13:12 ` [Bug c++/22603] [4.0.1 Regression] ICE " reichelt at gcc dot gnu dot org
  2005-09-27 16:08 ` [Bug c++/22603] [4.0 " mmitchel at gcc dot gnu dot org
  6 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-23  5:05 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor


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


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

* [Bug c++/22603] [4.0.1 Regression] ICE in pop_binding, at cp/name-lookup.c:380
  2005-07-22  2:32 [Bug c++/22603] New: internal compiler error: in pop_binding, at cp/name-lookup.c:380 flash at pobox dot com
                   ` (4 preceding siblings ...)
  2005-07-23  5:05 ` pinskia at gcc dot gnu dot org
@ 2005-07-25 13:12 ` reichelt at gcc dot gnu dot org
  2005-09-27 16:08 ` [Bug c++/22603] [4.0 " mmitchel at gcc dot gnu dot org
  6 siblings, 0 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-07-25 13:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2005-07-25 12:58 -------
Here's a similar example with valid code:

========================================
struct A
{
    template<int> struct B
    {
        void foo(const struct C&);
    };
};
========================================

GCC 4.0.0 is not affected - the problem was introduced between 4.0.0 and 4.0.1.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
           Severity|minor                       |normal
           Keywords|                            |ice-on-valid-code, monitored
      Known to fail|4.1.0                       |4.0.1
      Known to work|3.4.4                       |3.4.4 4.0.0 4.1.0
            Summary|[4.0 Regression] internal   |[4.0.1 Regression] ICE in
                   |compiler error: in          |pop_binding, at cp/name-
                   |pop_binding, at cp/name-    |lookup.c:380
                   |lookup.c:380                |


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


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

* [Bug c++/22603] [4.0 Regression] ICE in pop_binding, at cp/name-lookup.c:380
  2005-07-22  2:32 [Bug c++/22603] New: internal compiler error: in pop_binding, at cp/name-lookup.c:380 flash at pobox dot com
                   ` (5 preceding siblings ...)
  2005-07-25 13:12 ` [Bug c++/22603] [4.0.1 Regression] ICE " reichelt at gcc dot gnu dot org
@ 2005-09-27 16:08 ` mmitchel at gcc dot gnu dot org
  6 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-27 16:08 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.2                       |4.0.3


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


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

* [Bug c++/22603] [4.0 Regression] ICE in pop_binding, at cp/name-lookup.c:380
       [not found] <bug-22603-8581@http.gcc.gnu.org/bugzilla/>
  2005-10-13 11:51 ` nathan at gcc dot gnu dot org
  2005-10-14 16:00 ` cvs-commit at gcc dot gnu dot org
@ 2005-10-14 16:02 ` nathan at gcc dot gnu dot org
  2 siblings, 0 replies; 11+ messages in thread
From: nathan at gcc dot gnu dot org @ 2005-10-14 16:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from nathan at gcc dot gnu dot org  2005-10-14 16:02 -------
2005-10-14  Nathan Sidwell  <nathan@codesourcery.com>

        PR c++/22603
        Backport part of
        2005-03-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
        * name-lookup.c (pushtag): Skip template parameter scope when
        scope is ts_global.  Don't push tag into template parameter
        scope.


-- 

nathan at gcc dot gnu dot org changed:

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


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


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

* [Bug c++/22603] [4.0 Regression] ICE in pop_binding, at cp/name-lookup.c:380
       [not found] <bug-22603-8581@http.gcc.gnu.org/bugzilla/>
  2005-10-13 11:51 ` nathan at gcc dot gnu dot org
@ 2005-10-14 16:00 ` cvs-commit at gcc dot gnu dot org
  2005-10-14 16:02 ` nathan at gcc dot gnu dot org
  2 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-10-14 16:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from cvs-commit at gcc dot gnu dot org  2005-10-14 16:00 -------
Subject: Bug 22603

CVSROOT:        /cvs/gcc
Module name:    gcc
Branch:         gcc-4_0-branch
Changes by:     nathan@gcc.gnu.org      2005-10-14 16:00:25

Modified files:
        gcc/cp         : ChangeLog name-lookup.c 
        gcc/testsuite  : ChangeLog 
Added files:
        gcc/testsuite/g++.dg/parse: template18.C 

Log message:
        cp:
        PR c++/22603
        Backport part of
        2005-03-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
        * name-lookup.c (pushtag): Skip template parameter scope when
        scope is ts_global.  Don't push tag into template parameter
        scope.
        testsuite:
        PR c++/22603
        * g++.dg/parse/template18.C: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.4648.2.132&r2=1.4648.2.133
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/name-lookup.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.109.4.9&r2=1.109.4.10
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.456&r2=1.5084.2.457
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/template18.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1


-- 


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


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

* [Bug c++/22603] [4.0 Regression] ICE in pop_binding, at cp/name-lookup.c:380
       [not found] <bug-22603-8581@http.gcc.gnu.org/bugzilla/>
@ 2005-10-13 11:51 ` nathan at gcc dot gnu dot org
  2005-10-14 16:00 ` cvs-commit at gcc dot gnu dot org
  2005-10-14 16:02 ` nathan at gcc dot gnu dot org
  2 siblings, 0 replies; 11+ messages in thread
From: nathan at gcc dot gnu dot org @ 2005-10-13 11:51 UTC (permalink / raw)
  To: gcc-bugs



-- 

nathan at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |nathan at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-07-22 02:43:47         |2005-10-13 11:51:34
               date|                            |


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


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

end of thread, other threads:[~2005-10-14 16:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-22  2:32 [Bug c++/22603] New: internal compiler error: in pop_binding, at cp/name-lookup.c:380 flash at pobox dot com
2005-07-22  2:35 ` [Bug c++/22603] " flash at pobox dot com
2005-07-22  2:43 ` flash at pobox dot com
2005-07-22  3:16 ` [Bug c++/22603] [4.0 Regression] " pinskia at gcc dot gnu dot org
2005-07-22  4:03 ` pinskia at gcc dot gnu dot org
2005-07-23  5:05 ` pinskia at gcc dot gnu dot org
2005-07-25 13:12 ` [Bug c++/22603] [4.0.1 Regression] ICE " reichelt at gcc dot gnu dot org
2005-09-27 16:08 ` [Bug c++/22603] [4.0 " mmitchel at gcc dot gnu dot org
     [not found] <bug-22603-8581@http.gcc.gnu.org/bugzilla/>
2005-10-13 11:51 ` nathan at gcc dot gnu dot org
2005-10-14 16:00 ` cvs-commit at gcc dot gnu dot org
2005-10-14 16:02 ` nathan 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).