Debian Codegraph @

gcc/testsuite/gcc.target/i386/addr-space-6.c

raw
1 /* PR rtl-optimization/102733 */
2 /* { dg-do compile } */
3 /* { dg-options "-O1" } */
4
5 /* DSE was removing a store to fs:0 (correctly)
6 and gs:0 (incorrectly) as DSE didn't take into
7 account the address space was different. */
8
9 void test_null_store (void)
10 {
11 int __seg_fs *fs = (int __seg_fs *)0;
12 *fs = 1;
13
14 int __seg_gs *gs = (int __seg_gs *)0;
15 *gs = 2;
16 *fs = 3;
17 }
18
19 /* { dg-final { scan-assembler-times "movl\t" 2 } } */
20 /* { dg-final { scan-assembler "gs:" } } */
21 /* { dg-final { scan-assembler "fs:" } } */