📄 sra-1.c
字号:
/* { dg-do compile } */ /* { dg-options "-O1 -fdump-tree-optimized --param sra-max-structure-size=32" } *//* Tests for SRA. */typedef struct teststruct{ double d; char f1;} teststruct;voidcopystruct1 (teststruct param){ teststruct local; param.f1 = 0; local = param; if (local.f1 != 0) link_error ();}voidcopystruct11 (teststruct *param){ teststruct local; param->f1 = 0; local = *param; if (local.f1 != 0) link_error ();}voidcopystruct111 (teststruct param){ teststruct *local = ¶m; param.f1 = 0; if (local->f1 != 0) link_error ();}teststruct globf;voidcopystruct1111 (void){ teststruct local; globf.f1 = 0; local = globf; if (local.f1 != 0) link_error ();}voidcopystruct11111 (void){ teststruct *local = &globf; globf.f1 = 0; if (local->f1 != 0) link_error ();}voidcopystruct111111 (teststruct param){ static teststruct local; param.f1 = 0; local = param; if (local.f1 != 0) link_error ();}/* There should be no referenc to link_error. *//* { dg-final { scan-tree-dump-times "link_error" 0 "optimized"} } *//* { dg-final { cleanup-tree-dump "optimized" } } */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -