1 /* Limit this to known non-strict alignment targets. */
2 /* { dg-do run { target { i?86-*-linux* x86_64-*-linux* } } } */
3 /* { dg-options "-O -fsanitize=alignment -fno-sanitize-recover=alignment -fdump-tree-sanopt-details" } */
4 /* { dg-skip-if "" { *-*-* } { "-flto -fno-fat-lto-objects" } } */
5 /* { dg-shouldfail "ubsan" } */
7 struct S
{ int a
; char b
; long long c
; short d
[10]; };
8 struct T
{ char a
; long long b
; };
9 struct U
{ char a
; int b
; int c
; long long d
; struct S e
; struct T f
; } __attribute__((packed
));
10 struct V
{ long long a
; struct S b
; struct T c
; struct U u
; } v
;
12 __attribute__((noinline
, noclone
)) int
31 /* { dg-output "\.c:16:\[0-9]*: \[^\n\r]*member access within misaligned address 0x\[0-9a-fA-F]* for type 'struct S', which requires \[48] byte alignment.*" } */
32 /* { dg-final { scan-tree-dump-times "Optimizing" 4 "sanopt"} } */
33 /* { dg-final { cleanup-tree-dump "sanopt" } } */