forked from gcc-mirror/gcc
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LoongArch: Fixing ICE when returning struct with more than 2 vector m…
…ember. This patch fixes the wrong-placed condition inside loongarch_flatten_aggregate_field () function, which causes the ICE. gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_flatten_aggregate_field): Fixing ICE when returning struct with more than 2 vector member. gcc/testsuite/ChangeLog: * gcc.target/loongarch/vector/lasx/vect-abi-ret-struct-7.c: New test.
- Loading branch information
1 parent
84e74e7
commit 703cf04
Showing
2 changed files
with
22 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
gcc/testsuite/gcc.target/loongarch/vector/lasx/vect-abi-ret-struct-7.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* { dg-do compile } */ | ||
/* { dg-options "-O2 -mvecarg -mabi=lp64d -Wno-strict-aliasing" } */ | ||
|
||
typedef double __m256d __attribute__ ((__vector_size__ (32), | ||
__may_alias__)); | ||
|
||
typedef struct { | ||
__m256d x, y, z; | ||
} __m256dx3; | ||
|
||
__m256dx3 | ||
foo(__m256d x, __m256d y, __m256d z) | ||
{ | ||
__m256dx3 v = { x, y, z }; | ||
return v; | ||
} |