This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/28113] vectors initialized in ctors, not at compile time, cause altivec-3.C failure
- From: "mark at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Jun 2006 20:37:51 -0000
- Subject: [Bug c++/28113] vectors initialized in ctors, not at compile time, cause altivec-3.C failure
- References: <bug-28113-4503@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from mark at codesourcery dot com 2006-06-20 20:37 -------
Subject: Re: New: vectors initialized in ctors, not at compile
time, cause altivec-3.C failure
janis at gcc dot gnu dot org wrote:
> Test g++.dg/ext/altivec-3.C has been failing for mainline on powerpc64-linux
> systems without VMX hardware since this patch, a fix for PR20103, was added:
>
> http://gcc.gnu.org/viewcvs?view=rev&rev=114119
>
> r114119 | mmitchel | 2006-05-25 20:18:26 +0000 (Thu, 25 May 2006)
>
> The test calls a function at runtime to determine if VMX hardware is available
> and if not, skips the rest of the test. It now fails because vector global
> variables are initialized by constructors instead of at compile time. Here's a
> minimal example:
>
> __vector signed int vsi = (__vector signed int) {40, 41, 42, 43};
> int main () { return 0; }
>
> If the new behavior is expected then I'll change the test to be compile-only on
> systems without VMX hardware.
Ideally, the compiler would recognize that this initialization can be
done statically, but I don't think that the code as written is in any
way guaranteed to do a static initialization. So, yes, I think you
should change the test case.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28113