From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8946 invoked by alias); 15 Nov 2001 20:26:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 8908 invoked by uid 71); 15 Nov 2001 20:26:01 -0000 Resent-Date: 15 Nov 2001 20:26:01 -0000 Resent-Message-ID: <20011115202601.8907.qmail@sourceware.cygnus.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, pabuhr@uwaterloo.ca Resent-Reply-To: gcc-gnats@gcc.gnu.org, asharji@uwaterloo.ca Received:(qmail 8831 invoked by uid 61); 15 Nov 2001 20:25:40 -0000 Message-Id:<20011115202540.8830.qmail@sourceware.cygnus.com> Date: Sun, 04 Nov 2001 02:47:00 -0000 From: asharji@uwaterloo.ca Reply-To: asharji@uwaterloo.ca To: gcc-gnats@gcc.gnu.org Cc: pabuhr@uwaterloo.ca X-Send-Pr-Version:gnatsweb-2.9.2 (1.1.1.1.2.21) X-GNATS-Notify:pabuhr@uwaterloo.ca Subject: c++/4884: g++ 3.0.2 problem with -fvolatile X-SW-Source: 2001-11/txt/msg00093.txt.bz2 List-Id: >Number: 4884 >Category: c++ >Synopsis: g++ 3.0.2 problem with -fvolatile >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-legal-code >Submitter-Id: net >Arrival-Date: Thu Nov 15 12:26:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Ashif Harji >Release: gcc version 3.0.2 >Organization: >Environment: operating system version: Redhat 7.1 hardware architecture: athalon 1.4 ghz >Description: I am having a problem with g++ 3.0.2 using -fvolatile. 1>@awk[114]% g++ -v Reading specs from /u/asharji/gcc/gcc302/bin/../lib/gcc-lib/i686-pc-linux-gnu/3.0.2/specs Configured with: /u/asharji/gcc/gcc-3.0.2/configure --prefix=/u/asharji/gcc/gcc302/ Thread model: single gcc version 3.0.2 When I compile without -fvolatile, it works: 1>@awk[117]% g++ test1.cc -c But not when I compile with -fvolatile: 1>@awk[118]% g++ test1.cc -c -fvolatile test1.cc: In member function `void foo::mem()': test1.cc:14: Internal error #20000521. test1.cc:14: Internal compiler error in build_new_1, at cp/init.c:2426 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. This error does not occur with gcc-2.95.3: @tcl[104]% g++ -v Reading specs from /u/asharji/gcc/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/specs gcc version 2.95.3 20010315 (release) @tcl[110]% g++ test1.cc -c @tcl[111]% g++ test1.cc -c -fvolatile @tcl[112]% >How-To-Repeat: 1>@awk[113]% cat test1.cc typedef unsigned int size_t; class bar { int i; public : void * operator new ( size_t , void * storage ); }; class foo { int storage[ 5 ]; public: void mem ( ) { bar *s = new ( ( void * ) & storage ) bar; } }; 1>@awk[118]% g++ test1.cc -c -fvolatile >Fix: >Release-Note: >Audit-Trail: >Unformatted: