summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/pr98335.C
blob: c54f4d931ca8d62d9f33b1af86feb529608eb57a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */

struct Data {
  char a;
  int b;
};

char c;

Data val(int idx) {
  return { c };  // { dg-warning "extended initializer" "c++ 98"  { target { c++98_only } } }
}

/* { dg-final { scan-tree-dump-not " + 1B] = {}" "optimized" } } */