public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: asharji@uwaterloo.ca
To: gcc-gnats@gcc.gnu.org
Cc: pabuhr@uwaterloo.ca
Subject: c++/4884: g++ 3.0.2 problem with -fvolatile
Date: Sun, 04 Nov 2001 02:47:00 -0000	[thread overview]
Message-ID: <20011115202540.8830.qmail@sourceware.cygnus.com> (raw)


>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:


             reply	other threads:[~2001-11-15 20:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-04  2:47 asharji [this message]
2001-11-08 11:13 lerdsuwa
2001-11-08 11:36 lerdsuwa
2001-11-16  9:09 lerdsuwa
2002-03-25 10:53 mmitchel
2002-03-26 10:38 mmitchel
2002-03-26 15:26 Ashif S. Harji
2002-03-27 11:26 Mark Mitchell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011115202540.8830.qmail@sourceware.cygnus.com \
    --to=asharji@uwaterloo.ca \
    --cc=gcc-gnats@gcc.gnu.org \
    --cc=pabuhr@uwaterloo.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).