1 /* { dg-do compile } */ 2 /* { dg-options "-O2" } */ 3 /* { dg-require-effective-target arm32 } */ 4 extern void overflow_handler (); 5 overflow_sub(long long x,long long y)6long long overflow_sub (long long x, long long y) 7 { 8 long long r; 9 10 int ovr = __builtin_ssubll_overflow (x, y, &r); 11 if (ovr) 12 overflow_handler (); 13 14 return r; 15 } 16 17 /* { dg-final { scan-assembler "subs" } } */ 18 /* { dg-final { scan-assembler "sbcs" } } */ 19