https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64025
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org, | |uros at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- This breaks because find_base_term is confused by what ix86_find_base_term (which calls ix86_delegitimize_address) returns, namely the (something - symbol_ref ("_GLOBAL_OFFSET_TABLE_")) + (const ((symbol_ref ("p") + const_int)) as find_base_term considers only one symbol for its purposes. So, either we change ix86_find_base_term, so that it hides the (something - symbol_ref ("_GLOBAL_OFFSET_TABLE_")) part - often it stands for 0, as something is often just VALUE of the pic register or say pic register plus some variable offset and just returns the other part, or swap the order of the PLUS operands, so that the (const ...) part comes first and thus find_base_term first recurses on that, or move ix86_delegitimize_address to ix86_delegitimize_address_1, call it from ix86_delegitimize_address with some bool flag allowing what it does now, and from ix86_find_base_term disallowing that. Or change find_base_term, so that for PLUS/MINUS it always recurses into both arguments, and if both provide different bases, returns NULL (though, this change might be too expensive). Preferences?