[Bug target/68972] g++.dg/cpp1y/vla-initlist1.C test case fails on powerpc64le

jason at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jan 14 22:39:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68972

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Martin Sebor from comment #1)
> Confirmed with today's top of trunk.
> 
> But the test doesn't seem valid.  It only initializes the first element of
> the VLA (using A::A(int)).  The rest are initialized using the
> initializer-list ctor which leaves the values of the A::i member
> uninitialized.  It then checks to see that the value of a[1].i is the same
> as the what was in the previous VLA.  Does every target guarantee that the
> contents of the stack will stay unchanged or even that the two arrays will
> overlap?

The test is not well defined, but ought to work without optimization; I think I
was trying to test that the two VLAs are allocated in the same place.  It might
be better to test that directly, though, rather than rely on the stack being
unchanged.


More information about the Gcc-bugs mailing list