sra-1.c
来自「Mac OS X 10.4.9 for x86 Source Code gcc」· C语言 代码 · 共 73 行
C
73 行
/* { 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"} } */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?