PR tree-optimization/83369 - Missing diagnostics during inlining
[official-gcc.git] / gcc / testsuite / gcc.dg / lvalue-7.c
blob37964e1cd7633dd51ff356340d210f34d87c18ff
1 /* Test constraints on unary '&': PR 22367. */
3 /* { dg-do compile } */
4 /* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
6 extern void v;
7 void f1 (void) { &v; } /* { dg-error "taking address of expression of type 'void'" } */
9 extern void *pv;
10 void f2 (void) { &*pv; } /* { dg-warning "dereferencing" } */
12 extern const void cv;
13 void f3 (void) { &cv; }
15 extern const void *pcv;
16 void f4 (void) { &*pcv; } /* { dg-warning "dereferencing" } */