Skip to content
Snippets Groups Projects
Commit 5f1438db authored by Andrew Pinski's avatar Andrew Pinski
Browse files

c++: Add testcase for this PR [PR97990]


This testcase was fixed by r14-5934-gf26d68d5d128c8 but we should add
one to make sure it does not regress again.

Committed as obvious after a quick test on the testcase.

	PR c++/97990

gcc/testsuite/ChangeLog:

	* g++.dg/torture/vector-struct-1.C: New test.

Signed-off-by: default avatarAndrew Pinski <quic_apinski@quicinc.com>
parent bf6f00cb
No related branches found
No related tags found
No related merge requests found
/* PR c++/97990 */
/* This used to crash with lto and strict aliasing enabled as the
vector type variant still had TYPE_ALIAS_SET set on it. */
typedef __attribute__((__vector_size__(sizeof(short)))) short TSimd;
TSimd hh(int);
struct y6
{
TSimd VALUE;
~y6();
};
template <class T1,class T2>
auto f2(T1 p1, T2){
return hh(p1) <= 0;
}
void f1(){
f2(0, y6{});
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment