https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63191
--- Comment #7 from Steven Bosscher ---
(In reply to Steven Bosscher from comment #6)
> Now let's see if I can come up with a more reasonable test case...
Like so:
- 8< -
typedef int X;
struct Z {
Z(const X* x1, X x2, X x3) :
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63191
--- Comment #6 from Steven Bosscher ---
(In reply to woodfin from comment #5)
> You could try adding a non-static function that returns an address inside Zs.
>
> const Z* getzs() {
> return &Zs[0];
> }
Yes, that does the trick:
PID USER
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63191
--- Comment #5 from woodfin at intersystems dot com ---
You could try adding a non-static function that returns an address inside Zs.
const Z* getzs() {
return &Zs[0];
}
I'd think that would force it to actually perform the initialization if t
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63191
--- Comment #4 from Steven Bosscher ---
How is one to reproduce this bug with GCC5? I've tried:
$ ./xg++ --version
xg++ (GCC) 5.0.0 20150407 (experimental) [trunk revision 221906]
Copyright (C) 2015 Free Software Foundation, Inc.
This is free so
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63191
Jakub Jelinek changed:
What|Removed |Added
Target Milestone|4.8.4 |4.8.5
--- Comment #3 from Jakub Jelinek
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63191
Richard Biener changed:
What|Removed |Added
Priority|P3 |P2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63191
--- Comment #2 from Richard Biener ---
With
int a, b, c, d;
struct X { int a; int b; void *p; } z[4];
void foo (void)
{
z[0].a = 1;
z[0].b = 2;
z[0].p = &a;
z[1].a = 1;
z[1].b = 2;
z[1].p = &b;
z[2].a = 1;
z[2].b = 2;
z[2].p =
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63191
Richard Biener changed:
What|Removed |Added
Target||i?86-*-*
Status|UNCONFIRMED