IVOPT performance tuning patch. The main problem is a variant of maximal weight
[official-gcc.git] / gcc / testsuite / gcc.dg / call-diag-2.c
blob0d87e52e973ee9b9266d3b16efd1f0fdff5163fa
1 /* Test diagnostics for calling function returning qualified void or
2 other incomplete type other than void. PR 35210. */
3 /* { dg-do compile } */
4 /* { dg-options "-pedantic-errors" } */
6 const void f_cv (void);
7 struct s f_s (void);
8 void f_v (void);
10 void g1 (void) { f_cv (); } /* { dg-error "qualified void" } */
11 void g2 (void) { f_s (); } /* { dg-error "invalid use of undefined type" } */
12 void g3 (void) { ((const void (*) (void)) f_v) (); } /* { dg-error "qualified void" } */
13 /* { dg-warning "function called through a non-compatible type" "cast" { target *-*-* } 12 } */
14 /* { dg-message "will abort" "abort" { target *-*-* } 12 } */
15 void g4 (void) { ((struct s (*) (void)) f_v) (), (void) 0; } /* { dg-error "invalid use of undefined type" } */
16 /* { dg-warning "function called through a non-compatible type" "cast" { target *-*-* } 15 } */
17 /* { dg-message "will abort" "abort" { target *-*-* } 15 } */