// RUN: %llvmgxx %s -S -O2 -o - | \
// RUN:   ignore grep {eh\.selector.*One.*Two.*Three.*Four.*Five.*Six.*null} | \
// RUN:     wc -l | grep {\[01\]}

extern void X(void);

struct One   {};
struct Two   {};
struct Three {};
struct Four  {};
struct Five  {};
struct Six   {};

static void A(void) throw ()
{
  X();
}

static void B(void) throw (Two)
{
  try { A(); } catch (One) {}
}

static void C(void) throw (Six, Five)
{
  try { B(); } catch (Three) {} catch (Four) {}
}

int main ()
{
  try { C(); } catch (...) {}
}

// RUN: %llvmgxx %s -S -emit-llvm -O2 -o - | \
// RUN:   ignore grep {eh\.selector.*One.*Two.*Three.*Four.*Five.*Six.*null} | \
// RUN:     wc -l | grep {\[02\]}

extern void X(void);

struct One   {};
struct Two   {};
struct Three {};
struct Four  {};
struct Five  {};
struct Six   {};

static void A(void) throw ()
{
  X();
}

static void B(void) throw (Two)
{
  try { A(); } catch (One) {}
}

static void C(void) throw (Six, Five)
{
  try { B(); } catch (Three) {} catch (Four) {}
}

int main ()
{
  try { C(); } catch (...) {}
}

--- 
+++ 
@@ -1,6 +1,6 @@
-// RUN: %llvmgxx %s -S -emit-llvm -O2 -o - | \
+// RUN: %llvmgxx %s -S -O2 -o - | \
 // RUN:   ignore grep {eh\.selector.*One.*Two.*Three.*Four.*Five.*Six.*null} | \
-// RUN:     wc -l | grep {\[02\]}
+// RUN:     wc -l | grep {\[01\]}
 
 extern void X(void);
 
Fix this test: llvm-gcc-4.2 optimizes almost everything away,
resulting in zero matches, while llvm-gcc-4.1 manages to
remove one pointless selector changing the number of matches.


git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@41494 91177308-0d34-0410-b5e6-96231b3b80d8
