Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gcc.dg / floatn-errs.c
blob0dcc2f1bb97518ed31a5fb401d3b50ec13518baf
1 /* Tests for _FloatN / _FloatNx types: test erroneous code. */
2 /* { dg-do compile } */
3 /* { dg-options "" } */
4 /* { dg-add-options float32 } */
5 /* { dg-add-options float64 } */
6 /* { dg-add-options float32x } */
7 /* { dg-require-effective-target float32 } */
8 /* { dg-require-effective-target float32x } */
9 /* { dg-require-effective-target float64 } */
11 /* _FloatN, _FloatNx and standard types are incompatible even if they
12 have the same ABI. */
14 extern float a; /* { dg-message "previous declaration" } */
15 extern _Float32 a; /* { dg-error "conflicting" } */
17 extern double b; /* { dg-message "previous declaration" } */
18 extern _Float32x b; /* { dg-error "conflicting" } */
20 extern _Float64 c; /* { dg-message "previous declaration" } */
21 extern _Float32x c; /* { dg-error "conflicting" } */
23 /* These types are not promoted in old-style function definitions. */
25 void f (_Float32);
26 void
27 f (x)
28 _Float32 x;
32 void g (double); /* { dg-error "prototype declaration" } */
33 void
34 g (x)
35 _Float32 x; /* { dg-error "match prototype" } */
39 void h (_Float64); /* { dg-error "prototype declaration" } */
40 void
41 h (x)
42 _Float32 x; /* { dg-error "match prototype" } */