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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I can actually reproduce e.g. on x86_64-linux with:
extern void fn2(void);
extern void fn3(int);
int a, b;
void fn1() {
  int c;
  short d;
  switch (a) {
  case 22000:
    fn2();
  case 22300:
    b = 0;
  case 22600:
  case 22601:
  case 22900:
    fn3(1);
  case 20100:
    fn3(2);
  case 20200:
    fn3(3);
  case 20300:
    fn3(4);
  case 20400:
    fn3(5);
  case 20310:
    fn3(4);
  case 20410:
    fn3(5);
  }
  if (d || c) {
    do
      ;
    while (0);
  }
}

and -O2 --param logical-op-non-short-circuit=0 -fcompare-debug
--param=jump-table-max-growth-ratio-for-speed=5000
And the difference is the same:
--- pr99230-4.c.gkd     2021-03-01 13:44:32.625879468 +0100
+++ pr99230-4.gk.c.gkd  2021-03-01 13:44:32.731878292 +0100
@@ -9,7 +9,7 @@ Declarations used by fn1, sorted by DECL
 5:   void <L8>;
 4:   void <L9>;
 6:   void <L10>;
-1:   void <L16>;
+1:   void <L15>;

 ;; Function fn1 (fn1, funcdef_no=0, cgraph_uid=1, symbol_order=2)

Reply via email to