repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
tree: Don't reuse types if TYPE_USER_ALIGN differ [PR94775]
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wstrict-aliasing-2.C
blob
713b35461cf72d65dfe4b5c45b79e831012ade2e
1
/* { dg-do compile } */
2
/* { dg-options "-Wstrict-aliasing=2 -O2" } */
3
4
double x;
5
6
template <typename T>
7
T *foo(void)
8
{
9
return (T *)&x; /* { dg-bogus "strict-aliasing" } */
10
}
11
12
template double *foo<double>(void);
13