Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/tree-ssa/pr19431.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
line wrap: on
line source
/* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-optimized" } */ /* We want this optimized as <bb 2>: if (k != 0) goto <L2>; else goto <L3>; <L3>:; i1 = j1; <L2>:; return i1; This requires that i1 and j1 are changed into registers after they no longer have their address taken. */ int f(int k, int i1, int j1) { int *f1; if(k) f1 = &i1; else f1 = &j1; return *f1; } /* { dg-final { scan-tree-dump "\[^\r\n\]*_. = PHI <i1_\[^,\]*, j1_\[^>\]*>" "optimized" } } */