This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/28113] [4.2 Regression] 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 21:00:29 -0000
- Subject: [Bug c++/28113] [4.2 Regression] 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 #3 from mark at codesourcery dot com 2006-06-20 21:00 -------
Subject: Re: [4.2 Regression] vectors initialized in ctors,
not at compile time, cause altivec-3.C failure
pinskia at gcc dot gnu dot org wrote:
> ------- Comment #2 from pinskia at gcc dot gnu dot org 2006-06-20 20:56 -------
> (In reply to comment #1)
>> 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.
>
> Also is the initializer become a VECTOR_CST so it is easy to detect?
No, it will be an lvalue as required by the C standard.
The compiler would have to realize that an un-addressed temporary may be
used as a static initializer.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28113