comparison gcc/testsuite/g++.dg/torture/pr68852.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* { dg-do compile } */
2
3 struct A {
4 double x, y, z, w;
5 A() {}
6 A(double, double p2, double p3, double) : y(p2), z(p3) {}
7 void m_fn1();
8 };
9
10 struct B {
11 double x, y;
12 };
13 struct D : A {
14 D() {}
15 D(double p1, double p2, double p3, double p4) : A(p1, p2, p3, p4) {}
16 };
17
18 class C {
19 public:
20 float _11, _12, _13, _14;
21 float _21, _22, _23, _24;
22 float _31, _32, _33, _34;
23 float _41, _42, _43, _44;
24 D m_fn2(B p1) {
25 double z(p1.x + _43);
26 return *this * D(p1.x, p1.y, z, 1);
27 }
28 int ProjectRectBounds_next;
29 B __trans_tmp_3;
30 int m_fn3(int) {
31 B a, b;
32 D c[1];
33 b = __trans_tmp_3;
34 c[2] = m_fn2(b);
35 c[3] = m_fn2(a);
36 c[ProjectRectBounds_next].m_fn1();
37 }
38 D operator*(D p1) {
39 D d;
40 d.x = p1.x * _11 + p1.y * _21 + p1.z * _31 + _41;
41 d.y = p1.x * _12 + p1.y * _22 + p1.z * _32 + _42;
42 d.z = p1.x * _13 + p1.y * _23 + p1.z * _33 + _43;
43 d.w = p1.x * _14 + p1.y * _24 + p1.z * _34 + _44;
44 return d;
45 }
46 };
47
48 void fn1() {
49 C e;
50 int f = e.m_fn3(f);
51 }