c++/4884: g++ 3.0.2 problem with -fvolatile
asharji@uwaterloo.ca
asharji@uwaterloo.ca
Sun Nov 4 03:07:00 GMT 2001
>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 <URL:http://www.gnu.org/software/gcc/bugs.html> 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:
More information about the Gcc-bugs
mailing list