1/* PR other/29639 */ 2/* AIX gld supports garbage collection. But AIX gcc does not support 3 -ffunction-sections or -fdata-sections. */ 4/* { dg-do run { xfail rs6000-*-aix* powerpc*-*-aix* } } */ 5/* { dg-require-gc-sections "" } */ 6/* { dg-options "-ffunction-sections -Wl,--gc-sections" } */ 7 8extern "C" void abort (void); 9 10int g = 0; 11 12void raise_exception() 13{ 14 throw 1; 15} 16 17void used() 18{ 19 try { 20 raise_exception (); 21 } 22 catch (int) { 23 g = 1; 24 } 25} 26 27void unused() 28{ 29 try { 30 raise_exception (); 31 } 32 catch (int) { 33 g = 1; 34 } 35} 36 37int main() 38{ 39 used (); 40 41 if (g != 1) 42 abort (); 43 44 return 0; 45} 46