summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/opt/pr84272.C
blob: ad4b8a29cd7d0ae8d756f3ecac1428b3bb7ae40b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// PR target/84272
// { dg-do compile }
// { dg-options "-O2" }
// { dg-additional-options "-march=armv8-a -mtune=cortex-a57" { target aarch64-*-* } }

struct A
{
  float b, c;
  A ();
  A (float, float, float);
  float operator * (A)
  {
    float d = b * b + c * c;
    return d;
  }
};

void
foo ()
{
  A g[1];
  A h (0, 0, h * g[2]);
}