1*1f5207b7SJohn Levon #define __force __attribute__((force)) 2*1f5207b7SJohn Levon 3*1f5207b7SJohn Levon int foo(int *addr); foo(int * addr)4*1f5207b7SJohn Levonint foo(int *addr) 5*1f5207b7SJohn Levon { 6*1f5207b7SJohn Levon return *(*((typeof(addr) __force *) addr)); 7*1f5207b7SJohn Levon } 8*1f5207b7SJohn Levon 9*1f5207b7SJohn Levon /* 10*1f5207b7SJohn Levon * check-name: badtype5.c 11*1f5207b7SJohn Levon * check-description: 12*1f5207b7SJohn Levon * evaluate_dereference() used to miss a call to 13*1f5207b7SJohn Levon * examine_symbol_type(). This, in the present, left 14*1f5207b7SJohn Levon * a SYM_TYPEOF as type for the last dereferencing 15*1f5207b7SJohn Levon * which produced "error: cannot dereference this type". 16*1f5207b7SJohn Levon * The presence of the __force and the typeof is needed 17*1f5207b7SJohn Levon * to create the situation. 18*1f5207b7SJohn Levon */ 19