[Bug middle-end/104381] [12 Regression] -gtoggle no longer applied when using optimize attribute

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 4 12:44:47 GMT 2022


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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Err, it's worse(?)

> ./xgcc -B. t.c -O2 -fdump-tree-optimized -c

;; Function foo (foo, funcdef_no=0, decl_uid=1979, cgraph_uid=1,
symbol_order=0)

int foo (int x)
{
  <bb 2> [local count: 1073741824]:
  return x_1(D);

}



;; Function bar (bar, funcdef_no=1, decl_uid=1984, cgraph_uid=2,
symbol_order=1)

__attribute__((optimize ("no-tree-pre")))
int bar (int x)
{
  <bb 2> [local count: 1073741824]:
  # DEBUG tem => x_1(D) + 1
  # DEBUG tem2 => x_1(D)
  return x_1(D);

}

so it either applies -gtoggle or somehow enables at least
var-tracking-assignments (no .debug_info generated).


More information about the Gcc-bugs mailing list