New test from PR #3230

From-SVN: r44807
This commit is contained in:
Gabriel Dos Reis 2001-08-11 20:21:55 +00:00
parent ab61c93f12
commit 598f25beb6
1 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,21 @@
// { dg-do compile }
const int* bar();
const int&
foo1()
{
static int empty;
const int* x = bar();
return (x ? *x : empty);
}
const int&
foo2()
{
static int empty;
const int* x = bar();
const int& r = (x ? *x : empty);
return (r);
}