https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99862

--- Comment #1 from Zhendong Su <zhendong.su at inf dot ethz.ch> ---
[578] % gcctk -O1 -S -o O1.s small.c
[579] % gcctk -O3 -S -o O3.s small.c
[580] % 
[580] % wc O1.s O3.s
  22   43  410 O1.s
  37   77  682 O3.s
  59  120 1092 total
[581] % 
[581] % grep foo O1.s
[582] % grep foo O3.s
        call    foo
[583] % 
[583] % cat small.c
extern void foo(void);
static int a, b;
static void c() {
  if (a) {
    foo();
    for (; b < 1; b++)
      ;
  }
}
int main() {
  c();
  c();
  return 0;
}

Reply via email to