Bug 137738

Summary: g++ crash (segment violation cc1plus) when keyword New found
Product: [Fedora] Fedora Reporter: Gerard Torrent Gironella <gerard>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 2   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: 3.4.2-6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-31 19:39:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Gerard Torrent Gironella 2004-10-31 19:31:48 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)
Gecko/20040922

Description of problem:
try to compile this code:


/********************************************************************

compiled using: 
  g++ bugcpp.cpp

result obtained (in a CA_ES system):
  g++: Error intern: Violaci� de segment (programa cc1plus)
  Per favor envieu un informe complet d'error.
  Consulta <URL:http://bugzilla.redhat.com/bugzilla> per a m�s
instruccions.

system settings:
  Pentium IV 2400 (with hyperthreading)
  Fedora Core 2 (stable version, updated at 31/10/2004)
  g++ 3.3.3

********************************************************************/

#include <math.h>
#include <algorithm>
#include <string>

using namespace std;

class MyClass
{
  public:
    MyClass(string _name) {name = _name;}
    
    string name;
};

int main( int argc, char* argv[] )
{
  MyClass obj = New MyClass("rest");
}



Version-Release number of selected component (if applicable):
3.3.3 (g++ -dumpversion)

How reproducible:
Always

Steps to Reproduce:
1. compile the given code
2.
3.
    

Actual Results:    g++: Error intern: Violaci� de segment (programa
cc1plus)
  Per favor envieu un informe complet d'error.
  Consulta <URL:http://bugzilla.redhat.com/bugzilla> per a m�s
instruccions.


Expected Results:  a.out generation

Additional info:

Comment 1 Jakub Jelinek 2004-10-31 19:39:24 UTC
There is no keyword New.
This works just fine with g++ 3.4.2 and as it is ICE on invalid code,
I'm closing it as RAWHIDE (FC3 will be released in a few days).

g++ -o /tmp/T /tmp/T.C
/tmp/T.C: In function `int main(int, char**)':
/tmp/T.C:17: error: `New' undeclared (first use this function)
/tmp/T.C:17: error: (Each undeclared identifier is reported only once for each function it appears in.)
/tmp/T.C:17: error: expected `,' or `;' before "MyClass"