summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/pr78060.C
blob: d6cc7b312e5c100156cf7a83c89b97313ebbd01f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// PR tree-optimization/78060
// { dg-do compile }
// { dg-options "-O3 -fsplit-loops" }
class A {
public:
  template <typename T2> int &operator[](T2);
};
int a;
A b;
void fn1() {
  long c;
  for (int l; l < c; ++l)
    b[l] = l < 2 ?: a;
}