111
|
1 /* Copyright (C) 2003 Free Software Foundation.
|
|
2
|
|
3 Verify that all the __builtin_cabs? functions are recognized
|
|
4 by the compiler. Complex numbers are not supported with the
|
|
5 gcc.dg default "-pedantic-errors" option, so the dg-options
|
|
6 overrides this.
|
|
7
|
|
8 Written by Roger Sayle, 1st June 2003. */
|
|
9
|
|
10 /* { dg-do compile } */
|
|
11 /* { dg-options "-O -ansi" } */
|
|
12 /* { dg-final { scan-assembler-not "__builtin_" } } */
|
|
13
|
|
14 double test(__complex__ double x)
|
|
15 {
|
|
16 return __builtin_cabs (x);
|
|
17 }
|
|
18
|
|
19 float testf(__complex__ float x)
|
|
20 {
|
|
21 return __builtin_cabsf (x);
|
|
22 }
|
|
23
|
|
24 long double testl(__complex__ long double x)
|
|
25 {
|
|
26 return __builtin_cabsl (x);
|
|
27 }
|
|
28
|