Bug 20602 - gcc crashes and asks to submit a bug.
Summary: gcc crashes and asks to submit a bug.
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.2.1
: P2 normal
Target Milestone: 3.1.x/3.2.x
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-invalid-code
Depends on:
Blocks:
 
Reported: 2005-03-23 12:39 UTC by Hans de Nivelle
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work: 3.4.0 4.0.0 4.1.0
Known to fail: 3.2.2
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hans de Nivelle 2005-03-23 12:39:53 UTC
Hi,

g++ crashes and asks me to submit a bug on the following program fragment:


The command is:
   g++-3.2 -c -Wreturn-type -pedantic -pedantic-errors -Wundef testing.cpp -o  
  testing.o 

The OS:
   Linux 2.4.26.1.p4 #1  i686
   (and also on 2.4.21.4)

The code (file testing.cpp) is:

#include <vector>
#include <iostream>


template< class D > class union_find;
template< class D > class union_find<D> :: index;

template< class D >
std::ostream& operator << ( std::ostream& ,
                            const union_find< D > & );



int main( unsigned int nrarguments, char arguments [] )
{

   std::cout << "have a nice day without crashes!\n";

}
Comment 1 Andrew Pinski 2005-03-23 14:33:02 UTC
Fixed already in 3.2.3.  Confirmed in 3.2.2.

Also this is invalid code but only rejected in 3.4.0 and above.