Created attachment 41301 [details] gcc8-cst-load.patch The vrp113.c testcase (a copy of vrp40.c) is now XFAILed, because the switch optimization does a better job on it, but we don't manage to figure out that no matter what the index is we load always the same constant. For integer loads, we can also figure ranges from those even if the constants aren't the same, similarly for pointers (always NULL vs. always non-NULL vs. anything).
Mine.
Would also be a suitable enhancement for fold_const_aggregate_ref in general if you consider IPA-VRP propagation and _1 = AGGR[param_2(D)]; return _1;
*** Bug 93411 has been marked as a duplicate of this bug. ***
*** Bug 91326 has been marked as a duplicate of this bug. ***