Debian Codegraph @

gcc/testsuite/g++.dg/tree-ssa/pr92751.C

raw
1 // { dg-do compile }
2 // { dg-options "-O -fdump-tree-fre1" }
3
4 inline void* operator new(__SIZE_TYPE__, void* p) { return p; }
5 template<int N>
6 struct Vec {
7 Vec(int v) : lo(v), hi(v) {};
8 Vec<N/2> lo, hi;
9 };
10 template<>
11 struct Vec<1> {
12 Vec(int v) : val(v) {}
13 int val;
14 };
15
16 typedef int v4si __attribute__((vector_size(16)));
17 void foo (v4si *dst)
18 {
19 Vec<4> v(1);
20 v4si tem;
21 __builtin_memcpy (&tem, &v, sizeof (tem));
22 *dst = tem;
23 }
24
25 // FRE should be able to value-number 'tem' to a constant. */
26 // { dg-final { scan-tree-dump "\\*dst_\[0-9\]*\\\(D\\\) = { 1, 1, 1, 1 };" "fre1" } }