[Bug rtl-optimization/103465] Invalid note with -fno-reorder-blocks-and-partition

marxin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 29 13:23:23 GMT 2021


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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |WAITING

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Let's speak about the current master:

> With "12.0" (5e5f880d0452ef2cffb94f4a686d56833c9f4215), the note is not
> emitted with -fno-reorder-blocks-and-partition, however, the other problem
> remains. The note is still not emitted when the optimization is enabled
> implicitly via -O2.

I see:

/xgcc -B. /home/marxin/Programming/testcases/pr103465.c -c -O2
-freorder-blocks-and-partition
/home/marxin/Programming/testcases/pr103465.c:2:9: note:
‘-freorder-blocks-and-partition’ does not support unwind info on this
architecture
    2 | #pragma GCC optimize ("unroll-loops")
      |         ^~~
/home/marxin/Programming/testcases/pr103465.c:4:1: note:
‘-freorder-blocks-and-partition’ does not support unwind info on this
architecture
    4 | int main(int argc, char **argv) {
      | ^~~

which seems correct to me. With only -O2 there's no note emitted and the flags
are properly dropped (same in -freorder-blocks-and-partition):

$ cat -n gcc/opts.c
...
  1133    if (opts->x_flag_unwind_tables
  1134        && !targetm_common.unwind_tables_default
  1135        && opts->x_flag_reorder_blocks_and_partition
  1136        && (ui_except == UI_SJLJ || ui_except >= UI_TARGET))
  1137      {
  1138        if (opts_set->x_flag_reorder_blocks_and_partition)
  1139          inform (loc,
  1140                  "%<-freorder-blocks-and-partition%> does not support "
  1141                  "unwind info on this architecture");
  1142        opts->x_flag_reorder_blocks_and_partition = 0;
  1143        opts->x_flag_reorder_blocks = 1;
  1144      }

So what's wrong with that, please?


More information about the Gcc-bugs mailing list