File tree 2 files changed +41
-0
lines changed
2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ #include <assert.h>
2
+
3
+ int main (int argc , char * argv [])
4
+ {
5
+ unsigned char x = argc ;
6
+
7
+ for (int i = 0 ; i < 3 ; ++ i )
8
+ {
9
+ struct S
10
+ {
11
+ int a ;
12
+ int b [x + i + 1 ];
13
+ int * c ;
14
+ } __attribute((packed ));
15
+
16
+ struct S s ;
17
+
18
+ for (int j = 0 ; j < i ; ++ j )
19
+ s .b [x + j ] = j ;
20
+
21
+ for (int j = 0 ; j < i ; ++ j )
22
+ assert (s .b [x + j ] == j );
23
+
24
+ assert (
25
+ sizeof (struct S ) ==
26
+ sizeof (int * ) + ((unsigned char )argc + i + 2 ) * sizeof (int ));
27
+ }
28
+
29
+ return 0 ;
30
+ }
Original file line number Diff line number Diff line change
1
+ KNOWNBUG
2
+ main.c
3
+
4
+ ^EXIT=0$
5
+ ^SIGNAL=0$
6
+ ^VERIFICATION SUCCESSFUL$
7
+ --
8
+ ^warning: ignoring
9
+ --
10
+ Renaming is inconsistent across loop iterations as we map L1 names to types, but
11
+ do not actually introduce new L1 ids each time we declare an object.
You can’t perform that action at this time.
0 commit comments