mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-17 20:11:06 +08:00
pr51264-4.C: New test.
2012-04-17 Tom de Vries <tom@codesourcery.com> * g++.dg/pr51264-4.C: New test. From-SVN: r186547
This commit is contained in:
parent
b2cb7511d4
commit
bd9ee48c16
@ -1,3 +1,7 @@
|
||||
2012-04-17 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
* g++.dg/pr51264-4.C: New test.
|
||||
|
||||
2012-04-17 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/52599
|
||||
|
30
gcc/testsuite/g++.dg/pr51264-4.C
Normal file
30
gcc/testsuite/g++.dg/pr51264-4.C
Normal file
@ -0,0 +1,30 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O0 -Werror -Wreturn-type" } */
|
||||
|
||||
/* Test-case from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25973#c4. */
|
||||
|
||||
struct Block
|
||||
{
|
||||
public:
|
||||
Block ();
|
||||
~Block ();
|
||||
};
|
||||
|
||||
bool func (bool bar)
|
||||
{
|
||||
Block block;
|
||||
bool foo = false;
|
||||
|
||||
if (!foo || bar)
|
||||
do
|
||||
{
|
||||
return true;
|
||||
}
|
||||
while (0);
|
||||
else
|
||||
do
|
||||
{
|
||||
return false;
|
||||
}
|
||||
while (0);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user