repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
fortran/openmp.cc: Fix var init and locus use to avoid uninit values [PR fortran...
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
constexpr-83116.C
blob
18d79e2e1cced26e6613c032060b0402a84e6470
1
// PR c++/83116
2
// { dg-do run { target c++14 } }
3
// { dg-options "-O2" }
4
5
struct S {
6
constexpr S () : s(0) { foo (); }
7
constexpr int foo () { return s; }
8
int s;
9
};
10
11
int
12
main ()
13
{
14
static S var;
15
var.s = 5;
16
if (var.s != 5 || var.foo () != 5)
17
__builtin_abort ();
18
}