public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: optimization/10423: -fvolatile switch not working in gcc 3.2-3 when using -O2
@ 2003-04-21 22:36 Richard Henderson
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2003-04-21 22:36 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR optimization/10423; it has been noted by GNATS.

From: Richard Henderson <rth@redhat.com>
To: Zack Weinberg <zack@codesourcery.com>
Cc: dberger@motorola.com, gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org
Subject: Re: optimization/10423: -fvolatile switch not working in gcc 3.2-3 when using -O2
Date: Mon, 21 Apr 2003 15:30:17 -0700

 On Wed, Apr 16, 2003 at 11:03:20AM -0700, Zack Weinberg wrote:
 > (to the list:) How about we remove these options from 3.2.3 and 3.3 as
 > well?  It does not help anyone for them to be present but nonfunctional.
 
 Um, sure.
 
 
 r~


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: optimization/10423: -fvolatile switch not working in gcc 3.2-3 when using -O2
@ 2003-04-16 18:06 Zack Weinberg
  0 siblings, 0 replies; 3+ messages in thread
From: Zack Weinberg @ 2003-04-16 18:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR optimization/10423; it has been noted by GNATS.

From: Zack Weinberg <zack@codesourcery.com>
To: dberger@motorola.com
Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org
Subject: Re: optimization/10423: -fvolatile switch not working in gcc 3.2-3
 when using -O2
Date: Wed, 16 Apr 2003 11:03:20 -0700

 dberger@motorola.com writes:
 
 > Compile with following using "gcc -O2 -fvolatile -S":
 >
 > void test(void)
 > {
 >   *(char *)0x100 = 1;
 >   *(char *)0x100 = 1;
 >   *(char *)0x100 = 1;
 >   *(char *)0x100 = 1;
 > }
 
 Allow me to refer you to the release notes for gcc 3.4 (that will be):
 
   GCC no longer accepts the options -fvolatile, -fvolatile-global and
   -fvolatile-static. It is unlikely that they worked correctly in any
   3.x release.
 
 Note in particular the last sentence.  You've just confirmed that it
 doesn't work.
 
 (to the list:) How about we remove these options from 3.2.3 and 3.3 as
 well?  It does not help anyone for them to be present but nonfunctional.
 
 zw


^ permalink raw reply	[flat|nested] 3+ messages in thread

* optimization/10423: -fvolatile switch not working in gcc 3.2-3 when using -O2
@ 2003-04-16 17:16 dberger
  0 siblings, 0 replies; 3+ messages in thread
From: dberger @ 2003-04-16 17:16 UTC (permalink / raw)
  To: gcc-gnats


>Number:         10423
>Category:       optimization
>Synopsis:       -fvolatile switch not working in gcc 3.2-3 when using -O2
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 16 17:16:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     dberger@motorola.com
>Release:        3.2-3
>Organization:
>Environment:
Cygwin and Solaris, native and cross compilers
>Description:
Compile with following using "gcc -O2 -fvolatile -S":

void test(void)
{
  *(char *)0x100 = 1;
  *(char *)0x100 = 1;
  *(char *)0x100 = 1;
  *(char *)0x100 = 1;
}

The definition of -fvolatile should cause four writes to be generated - always.  With the 2.95 compiler that is what occurs.  With the 3.2-3 compiler, only one remains after optimization.   This is a serious problem for embedded, legacy programs.
>How-To-Repeat:

>Fix:
Is there a workaround?
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-04-21 22:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-21 22:36 optimization/10423: -fvolatile switch not working in gcc 3.2-3 when using -O2 Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
2003-04-16 18:06 Zack Weinberg
2003-04-16 17:16 dberger

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).