public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/22172] New: Internal compiler error, seg fault.
@ 2005-06-24 12:41 thomas dot magyar at navy dot mil
  2005-06-24 12:44 ` [Bug c++/22172] " thomas dot magyar at navy dot mil
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: thomas dot magyar at navy dot mil @ 2005-06-24 12:41 UTC (permalink / raw)
  To: gcc-bugs

This internal compiler error is being generated when I add the 
keyword 'typename' to a line of code that 

before that was giving me an error that:  SAX/wrappers/saxlibxml2.h:310: error: 
expected primary-expression 

before '*' token. 

In the saxlibxml2.ii file, it is at line 35577. 


Specs from /usr/local/lib/gc/mips-sgi-irix6.5/3.4.4/specs
Configured with ./configure
Thread model: single
gcc v3.4.4

Command line: 
g++ -c -I../../Include/SAX ../../Include/SAX/wrappers/saxlibxml2.cpp -
o ../../Include/SAX/wrappers/saxlibxml2.o

Compiler output:

In file included 
from ../../Include/SAX/wrappers/saxlibxml2.cpp:7: ../../Include/SAX/wrappers/sax
libxml2.h: In 

member function 'virtual std::auto_ptr<typename 
SAX::basic_XMLreader<string_type>::PropertyBase> 

SAX::libxml2_wrapper<string_type, string_adapter_type>::doGetProperty(const 
string_type&)':
.../SAX/wrappers/saxlibxml2.:311: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
gmake: *** [../../Include/SAX/wrappers/saxlibxml2.o] Error 1

-- 
           Summary: Internal compiler error, seg fault.
           Product: gcc
           Version: 3.4.4
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: thomas dot magyar at navy dot mil
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug c++/22172] Internal compiler error, seg fault.
  2005-06-24 12:41 [Bug c++/22172] New: Internal compiler error, seg fault thomas dot magyar at navy dot mil
@ 2005-06-24 12:44 ` thomas dot magyar at navy dot mil
  2005-06-24 13:30 ` [Bug c++/22172] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: thomas dot magyar at navy dot mil @ 2005-06-24 12:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From thomas dot magyar at navy dot mil  2005-06-24 12:43 -------
Created an attachment (id=9143)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9143&action=view)
The ii file from the compiler output where I received the seg fault.

Line 35577 in this file contains the 'typename' that I added to make this
compiler have an internal error. Without this keyword, I get a compile error.
So, it seems to be required...but I can't build my source.

-- 


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


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

* [Bug c++/22172] [3.4/4.0/4.1 Regression] Internal compiler error, seg fault.
  2005-06-24 12:41 [Bug c++/22172] New: Internal compiler error, seg fault thomas dot magyar at navy dot mil
  2005-06-24 12:44 ` [Bug c++/22172] " thomas dot magyar at navy dot mil
@ 2005-06-24 13:30 ` pinskia at gcc dot gnu dot org
  2005-06-24 15:30 ` reichelt at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-24 13:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-06-24 13:30 -------
Confirmed, here is a reduced testcase:
template<class a>
struct cla
{
  template<typename b>
  struct clb {};
};
namespace nasa { template<class a> struct clc {}; }
template<class a>
void doGetProperty(void)
{
    cla<a>::clb<typename nasa::clc<a> *> *prop;
}
--- ICE ---
pr22172.cc:12: internal compiler error: tree check: expected class 'type', have 'declaration' 
(namespace_decl) in dependent_type_p, at cp/pt.c:12027
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-invalid-code
      Known to fail|                            |4.0.0 4.1.0
      Known to work|                            |3.4.0 3.4.4
   Last reconfirmed|0000-00-00 00:00:00         |2005-06-24 13:30:49
               date|                            |
            Summary|Internal compiler error, seg|[3.4/4.0/4.1 Regression]
                   |fault.                      |Internal compiler error, seg
                   |                            |fault.
   Target Milestone|---                         |3.4.5


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


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

* [Bug c++/22172] [3.4/4.0/4.1 Regression] Internal compiler error, seg fault.
  2005-06-24 12:41 [Bug c++/22172] New: Internal compiler error, seg fault thomas dot magyar at navy dot mil
  2005-06-24 12:44 ` [Bug c++/22172] " thomas dot magyar at navy dot mil
  2005-06-24 13:30 ` [Bug c++/22172] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-06-24 15:30 ` reichelt at gcc dot gnu dot org
  2005-07-22 21:18 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-06-24 15:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2005-06-24 15:30 -------
Your line should read:

  typename SAX::basic_XMLReader<stringT>::template
Property<SAX::basic_DeclHandler<stringT> *>* prop;

If one fixes all four occurances in your file, the code compiles fine.


With your version

    SAX::basic_XMLReader<stringT>::Property<typename
SAX::basic_DeclHandler<stringT> *>* prop;

"SAX::basic_XMLReader<stringT>::Property" is not a type, and therefore "<"
is the operator "less_than" which is followed by a type (followed by some
more stuff, but the compiler already crashed).


An even shorter testcase is the following:

===========================================
namespace N { template<int> struct A {}; }

template<typename> void foo()
{
    +typename N::A<0>;
}
===========================================


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
           Keywords|                            |monitored
      Known to fail|4.0.0 4.1.0                 |3.4.0 3.4.4 4.0.0 4.1.0
      Known to work|3.4.0 3.4.4                 |3.3 3.3.6


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


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

* [Bug c++/22172] [3.4/4.0/4.1 Regression] Internal compiler error, seg fault.
  2005-06-24 12:41 [Bug c++/22172] New: Internal compiler error, seg fault thomas dot magyar at navy dot mil
                   ` (2 preceding siblings ...)
  2005-06-24 15:30 ` reichelt at gcc dot gnu dot org
@ 2005-07-22 21:18 ` pinskia at gcc dot gnu dot org
  2005-09-24 20:45 ` phython at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-22 21:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-22 21:13 -------
Moving to 4.0.2 pre Mark.

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


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


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

* [Bug c++/22172] [3.4/4.0/4.1 Regression] Internal compiler error, seg fault.
  2005-06-24 12:41 [Bug c++/22172] New: Internal compiler error, seg fault thomas dot magyar at navy dot mil
                   ` (3 preceding siblings ...)
  2005-07-22 21:18 ` pinskia at gcc dot gnu dot org
@ 2005-09-24 20:45 ` phython at gcc dot gnu dot org
  2005-09-24 20:59 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: phython at gcc dot gnu dot org @ 2005-09-24 20:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From phython at gcc dot gnu dot org  2005-09-24 20:44 -------
Created an attachment (id=9800)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9800&action=view)
We should give the user an error message

 Anyone have a better error message?

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


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


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

* [Bug c++/22172] [3.4/4.0/4.1 Regression] Internal compiler error, seg fault.
  2005-06-24 12:41 [Bug c++/22172] New: Internal compiler error, seg fault thomas dot magyar at navy dot mil
                   ` (4 preceding siblings ...)
  2005-09-24 20:45 ` phython at gcc dot gnu dot org
@ 2005-09-24 20:59 ` pinskia at gcc dot gnu dot org
  2005-09-26  8:10 ` reichelt at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-24 20:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-24 20:59 -------
Only the following:
if (TREE_CODE_CLASS (TREE_CODE (scope)) != tcc_type)
Should be:
if (!TYPE_P (scope))

-- Pinski

-- 


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


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

* [Bug c++/22172] [3.4/4.0/4.1 Regression] Internal compiler error, seg fault.
  2005-06-24 12:41 [Bug c++/22172] New: Internal compiler error, seg fault thomas dot magyar at navy dot mil
                   ` (5 preceding siblings ...)
  2005-09-24 20:59 ` pinskia at gcc dot gnu dot org
@ 2005-09-26  8:10 ` reichelt at gcc dot gnu dot org
  2005-09-26 17:32 ` phython at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-09-26  8:10 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2005-09-26 08:09 -------
I don't think that this is a proper fix, since the following IMHO valid
code snippet is rejected:

====================================================================
namespace N { template<int> struct A { operator int() const; }; }

template<typename> void foo()
{
    +typename N::A<0>();
}
====================================================================


-- 


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


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

* [Bug c++/22172] [3.4/4.0/4.1 Regression] Internal compiler error, seg fault.
  2005-06-24 12:41 [Bug c++/22172] New: Internal compiler error, seg fault thomas dot magyar at navy dot mil
                   ` (6 preceding siblings ...)
  2005-09-26  8:10 ` reichelt at gcc dot gnu dot org
@ 2005-09-26 17:32 ` phython at gcc dot gnu dot org
  2005-09-26 19:01 ` bangerth at dealii dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: phython at gcc dot gnu dot org @ 2005-09-26 17:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From phython at gcc dot gnu dot org  2005-09-26 17:31 -------
 So this is an ice-on-valid and an ice-on-invalid bug then?

-- 


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


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

* [Bug c++/22172] [3.4/4.0/4.1 Regression] Internal compiler error, seg fault.
  2005-06-24 12:41 [Bug c++/22172] New: Internal compiler error, seg fault thomas dot magyar at navy dot mil
                   ` (7 preceding siblings ...)
  2005-09-26 17:32 ` phython at gcc dot gnu dot org
@ 2005-09-26 19:01 ` bangerth at dealii dot org
  2005-09-27 16:25 ` mmitchel at gcc dot gnu dot org
  2005-10-01 11:07 ` mmitchel at gcc dot gnu dot org
  10 siblings, 0 replies; 13+ messages in thread
From: bangerth at dealii dot org @ 2005-09-26 19:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2005-09-26 19:00 -------
The testcase in comment #3 shows an ice-on-invalid. The testcase in 
comment #7 is valid, and ices anyway. 
 
W. 

-- 


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


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

* [Bug c++/22172] [3.4/4.0/4.1 Regression] Internal compiler error, seg fault.
  2005-06-24 12:41 [Bug c++/22172] New: Internal compiler error, seg fault thomas dot magyar at navy dot mil
                   ` (8 preceding siblings ...)
  2005-09-26 19:01 ` bangerth at dealii dot org
@ 2005-09-27 16:25 ` mmitchel at gcc dot gnu dot org
  2005-10-01 11:07 ` mmitchel at gcc dot gnu dot org
  10 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-27 16:25 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=22172


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

* [Bug c++/22172] [3.4/4.0/4.1 Regression] Internal compiler error, seg fault.
  2005-06-24 12:41 [Bug c++/22172] New: Internal compiler error, seg fault thomas dot magyar at navy dot mil
                   ` (9 preceding siblings ...)
  2005-09-27 16:25 ` mmitchel at gcc dot gnu dot org
@ 2005-10-01 11:07 ` mmitchel at gcc dot gnu dot org
  10 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-10-01 11:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2005-10-01 11:07 -------
This path is OK, without the spurious addition of the blank line.

-- 


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


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

* [Bug c++/22172] [3.4/4.0/4.1 Regression] Internal compiler error, seg fault.
       [not found] <bug-22172-10869@http.gcc.gnu.org/bugzilla/>
@ 2005-10-08 18:11 ` cvs-commit at gcc dot gnu dot org
  0 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-10-08 18:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from cvs-commit at gcc dot gnu dot org  2005-10-08 18:11 -------
Subject: Bug 22172

CVSROOT:        /cvs/gcc
Module name:    gcc
Changes by:     phython@gcc.gnu.org     2005-10-08 18:11:02

Modified files:
        gcc/cp         : ChangeLog parser.c 
        gcc/testsuite  : ChangeLog 
Added files:
        gcc/testsuite/g++.dg/parse: crash30.C 

Log message:
        2005-10-08  James A. Morrison  <phython@gcc.gnu.org>

        PR c++/22172
        * parser.c (cp_parser_postfix_expression) <RID_TYPENAME>: Treat nontype
        scopes as nondependent.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4914&r2=1.4915
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.360&r2=1.361
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6151&r2=1.6152
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/crash30.C.diff?cvsroot=gcc&r1=NONE&r2=1.1


-- 


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


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

end of thread, other threads:[~2005-10-08 18:11 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-24 12:41 [Bug c++/22172] New: Internal compiler error, seg fault thomas dot magyar at navy dot mil
2005-06-24 12:44 ` [Bug c++/22172] " thomas dot magyar at navy dot mil
2005-06-24 13:30 ` [Bug c++/22172] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-06-24 15:30 ` reichelt at gcc dot gnu dot org
2005-07-22 21:18 ` pinskia at gcc dot gnu dot org
2005-09-24 20:45 ` phython at gcc dot gnu dot org
2005-09-24 20:59 ` pinskia at gcc dot gnu dot org
2005-09-26  8:10 ` reichelt at gcc dot gnu dot org
2005-09-26 17:32 ` phython at gcc dot gnu dot org
2005-09-26 19:01 ` bangerth at dealii dot org
2005-09-27 16:25 ` mmitchel at gcc dot gnu dot org
2005-10-01 11:07 ` mmitchel at gcc dot gnu dot org
     [not found] <bug-22172-10869@http.gcc.gnu.org/bugzilla/>
2005-10-08 18:11 ` cvs-commit 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).