public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: optimization/6956: when the given code is compiled with optimization > 0, it fails
@ 2003-03-22 17:49 bangerth
0 siblings, 0 replies; 4+ messages in thread
From: bangerth @ 2003-03-22 17:49 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, spamjunk
Synopsis: when the given code is compiled with optimization > 0, it fails
State-Changed-From-To: open->feedback
State-Changed-By: bangerth
State-Changed-When: Sat Mar 22 17:49:19 2003
State-Changed-Why:
This code yields "5" for me on all versions of gcc I have
access to. Unfortunately, you don't say which version you
are using, and also not what you mean by "it fails". Can
you elaborate?
Thanks
Wolfgang
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6956
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: optimization/6956: when the given code is compiled with optimization > 0, it fails
@ 2003-03-24 15:15 bangerth
0 siblings, 0 replies; 4+ messages in thread
From: bangerth @ 2003-03-24 15:15 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, spamjunk
Synopsis: when the given code is compiled with optimization > 0, it fails
State-Changed-From-To: feedback->closed
State-Changed-By: bangerth
State-Changed-When: Mon Mar 24 15:14:44 2003
State-Changed-Why:
Apparently fixed
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6956
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: optimization/6956: when the given code is compiled with optimization > 0, it fails
@ 2003-03-22 23:06 Rich Herrick
0 siblings, 0 replies; 4+ messages in thread
From: Rich Herrick @ 2003-03-22 23:06 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR optimization/6956; it has been noted by GNATS.
From: "Rich Herrick" <spamjunk@stny.rr.com>
To: <bangerth@dealii.org>, <gcc-bugs@gcc.gnu.org>, <gcc-prs@gcc.gnu.org>,
<nobody@gcc.gnu.org>, <spamjunk@stny.rr.com>, <gcc-gnats@gcc.gnu.org>
Cc:
Subject: Re: optimization/6956: when the given code is compiled with optimization > 0, it fails
Date: Sat, 22 Mar 2003 17:58:54 -0500
I believe the problem is fixed in the latest version of gcc.
Thanks!
----- Original Message -----
From: <bangerth@dealii.org>
To: <gcc-bugs@gcc.gnu.org>; <gcc-prs@gcc.gnu.org>; <nobody@gcc.gnu.org>;
<spamjunk@stny.rr.com>
Sent: Saturday, March 22, 2003 12:49 PM
Subject: Re: optimization/6956: when the given code is compiled with
optimization > 0, it fails
> Synopsis: when the given code is compiled with optimization > 0, it fails
>
> State-Changed-From-To: open->feedback
> State-Changed-By: bangerth
> State-Changed-When: Sat Mar 22 17:49:19 2003
> State-Changed-Why:
> This code yields "5" for me on all versions of gcc I have
> access to. Unfortunately, you don't say which version you
> are using, and also not what you mean by "it fails". Can
> you elaborate?
>
> Thanks
> Wolfgang
>
>
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p
r=6956
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* optimization/6956: when the given code is compiled with optimization > 0, it fails
@ 2002-06-07 7:46 spamjunk
0 siblings, 0 replies; 4+ messages in thread
From: spamjunk @ 2002-06-07 7:46 UTC (permalink / raw)
To: gcc-gnats
>Number: 6956
>Category: optimization
>Synopsis: when the given code is compiled with optimization > 0, it fails
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jun 07 07:45:59 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: spamjunk@stny.rr.com
>Release: unknown-1.0
>Organization:
>Environment:
dos/windows
>Description:
#include <cstdio>
using namespace std;
template<class T, int I>
struct A {
A() {}
typedef T array[I];
struct B {
array a;
};
static B X()
{
const B b = {{0, 0, 5}};
return b;
}
};
typedef A<int, 5> C;
int main()
{
printf("%d\n", C::X().a[2]);
return 0;
}
This code fails with optimization turned on. If b is made a static constant, it doesn't fail.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-03-24 15:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-22 17:49 optimization/6956: when the given code is compiled with optimization > 0, it fails bangerth
-- strict thread matches above, loose matches on Subject: below --
2003-03-24 15:15 bangerth
2003-03-22 23:06 Rich Herrick
2002-06-07 7:46 spamjunk
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).