From 1ddb9ec910a77414305a4b3bba72e3f4ae02f92a Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Thu, 6 Nov 2008 14:20:04 +0000 Subject: [PATCH] pr37969.c: New testcase. 2008-11-06 Richard Guenther * gcc.dg/c-torture/pr37969.c: New testcase. From-SVN: r141642 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/torture/pr37969.c | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/torture/pr37969.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 76de5b93aef..04ec162e0f5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2008-11-06 Richard Guenther + + * gcc.dg/torture/pr37969.c: New testcase. + 2008-11-05 Janis Johnson * lib/c-torture.exp: Use ADDITIONAL_TORTURE_OPTIONS if defined. diff --git a/gcc/testsuite/gcc.dg/torture/pr37969.c b/gcc/testsuite/gcc.dg/torture/pr37969.c new file mode 100644 index 00000000000..cbb6f059879 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr37969.c @@ -0,0 +1,20 @@ +/* { dg-do compile } */ +/* { dg-options "-funswitch-loops" } */ + +void foo(double); +void CreateDefaultTexture(double mnMinimum, double mnMaximum, + unsigned short nCreateWhat) +{ + double d = 0.0; + for(;;) + { + if(nCreateWhat & (0x0001) + && mnMinimum != 0.0) + d = mnMinimum; + if(nCreateWhat & (0x0002) + && mnMaximum != 0.0) + d = mnMaximum; + foo(d); + } +} +