Merge from mainline (165734:167278).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / template / dependent-expr3.C
blob97fddbdd8d44819deab9e82215b7c0592216adc6
1 // { dg-do compile }
2 // Origin: jbrandmeyer at users dot sourceforge dot net
3 // PR c++/12573: COMPONENT_REFs must be inspected for dependness.
5 template <bool> struct S;
7 template <typename K> struct Y : K {
8   int x;
9 };
11 template <class T> struct Z {
12   S< (bool)(&static_cast<Y<T> *>(0)->x == 0) > // { dg-error "" }
13   s;