* [pushed] c++: vector compound literal [PR105187]
@ 2022-04-07 1:26 Jason Merrill
2022-04-08 8:02 ` [committed] testsuite: Fix up 20050113-1.c test for i686-linux [PR105187] Jakub Jelinek
0 siblings, 1 reply; 2+ messages in thread
From: Jason Merrill @ 2022-04-07 1:26 UTC (permalink / raw)
To: gcc-patches
My cleanup in r12-296 cleared TREE_HAS_CONSTRUCTOR on digested class
initializers, but we leave it set for vectors, since we can't wrap them in
TARGET_EXPR.
Tested x86_64-pc-linux-gnu, applying to trunk.
PR c++/105187
gcc/cp/ChangeLog:
* typeck2.cc (store_init_value): Allow TREE_HAS_CONSTRUCTOR for
vectors.
gcc/testsuite/ChangeLog:
* gcc.c-torture/compile/20050113-1.c: Moved to...
* c-c++-common/torture/20050113-1.c: ...here.
---
gcc/cp/typeck2.cc | 1 +
.../{gcc.c-torture/compile => c-c++-common/torture}/20050113-1.c | 0
2 files changed, 1 insertion(+)
rename gcc/testsuite/{gcc.c-torture/compile => c-c++-common/torture}/20050113-1.c (100%)
diff --git a/gcc/cp/typeck2.cc b/gcc/cp/typeck2.cc
index cebe6acf487..23ed81ec063 100644
--- a/gcc/cp/typeck2.cc
+++ b/gcc/cp/typeck2.cc
@@ -922,6 +922,7 @@ store_init_value (tree decl, tree init, vec<tree, va_gc>** cleanups, int flags)
here it should have been digested into an actual value for the type. */
gcc_checking_assert (TREE_CODE (value) != CONSTRUCTOR
|| processing_template_decl
+ || TREE_CODE (type) == VECTOR_TYPE
|| !TREE_HAS_CONSTRUCTOR (value));
/* If the initializer is not a constant, fill in DECL_INITIAL with
diff --git a/gcc/testsuite/gcc.c-torture/compile/20050113-1.c b/gcc/testsuite/c-c++-common/torture/20050113-1.c
similarity index 100%
rename from gcc/testsuite/gcc.c-torture/compile/20050113-1.c
rename to gcc/testsuite/c-c++-common/torture/20050113-1.c
base-commit: cc76c502a761ddaee215bcbd8fe4720e46d3b9dd
--
2.27.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [committed] testsuite: Fix up 20050113-1.c test for i686-linux [PR105187]
2022-04-07 1:26 [pushed] c++: vector compound literal [PR105187] Jason Merrill
@ 2022-04-08 8:02 ` Jakub Jelinek
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Jelinek @ 2022-04-08 8:02 UTC (permalink / raw)
To: Jason Merrill; +Cc: gcc-patches
On Wed, Apr 06, 2022 at 09:26:56PM -0400, Jason Merrill via Gcc-patches wrote:
> gcc/testsuite/ChangeLog:
>
> * gcc.c-torture/compile/20050113-1.c: Moved to...
> * c-c++-common/torture/20050113-1.c: ...here.
The test FAILs on i686-linux if neither MMX isn't enabled, can be also
reproduced with
make check-gcc check-g++ RUNTESTFLAGS='--target_board=unix/-m32/-mno-mmx/-mno-sse dg-torture.exp=20050113-1.c'
on x86_64-linux. Previously the test was in gcc.c-torture/compile/
where -w is added by default.
Tested on x86_64-linux, committed to trunk as obvious.
2022-04-08 Jakub Jelinek <jakub@redhat.com>
PR c++/105187
* c-c++-common/torture/20050113-1.c: Add dg-additional-options
-Wno-psabi.
--- gcc/testsuite/c-c++-common/torture/20050113-1.c.jj 2022-04-07 09:09:54.458994772 +0200
+++ gcc/testsuite/c-c++-common/torture/20050113-1.c 2022-04-08 09:49:29.117897860 +0200
@@ -1,4 +1,5 @@
/* PR c/17297 */
+/* { dg-additional-options "-Wno-psabi" } */
typedef float V2SF __attribute__ ((vector_size (8)));
Jakub
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-08 8:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-07 1:26 [pushed] c++: vector compound literal [PR105187] Jason Merrill
2022-04-08 8:02 ` [committed] testsuite: Fix up 20050113-1.c test for i686-linux [PR105187] Jakub Jelinek
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).