(root)/
gcc-13.2.0/
gcc/
testsuite/
g++.dg/
warn/
Wstrict-aliasing-bogus-const.C
/* { dg-do compile } */
/* { dg-options "-O2 -Wstrict-aliasing -fstrict-aliasing" } */

int foo(int* p) {
  const int& q = *p;  /* { dg-bogus "const vs. non-const" } */
  *p = 1;
  return q;
}