Bug 137738 - g++ crash (segment violation cc1plus) when keyword New found
g++ crash (segment violation cc1plus) when keyword New found
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
2
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-31 14:31 EST by Gerard Torrent Gironella
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: 3.4.2-6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-31 14:39:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Gerard Torrent Gironella 2004-10-31 14:31:48 EST
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 14:39:24 EST
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"

Note You need to log in before you can comment on or make changes to this bug.