https://gcc.gnu.org/g:456cf8e86579c540384b8dc5cebf5df5106c4ea9

commit r16-6683-g456cf8e86579c540384b8dc5cebf5df5106c4ea9
Author: Jeff Law <[email protected]>
Date:   Sat Jan 10 11:23:41 2026 -0700

    Fix regression on mcore-elf port after recent switch conversion change
    
    Filip's recent change to re-enable switch conversion at -Og triggered a
    regression on the mcore-elf target.
    
    If we look at tree-switch-conversion.cc we have this:
    
      if (flag_pic)
        return false;
    
    The mcore-elf port defines a dummy ASM_OUTPUT_ADDR_DIFF_ELT which is 
designed
    to trigger an assembler syntax error and thus fail loudly.  That definition
    comes from a time when it appears we had to define that macro in every port,
    even if it wasn't being used.
    
    These days we do not need to define that macro unless it's really needed.  
And
    a definition like the one for mcore-elf will cause problems
    (compile/pr69102.c).  That definition has also been the cause of a long
    standing failure in the port (gcc.dg/pr47446-2.c).
    
    Naturally this has been through a round of testing where it fixes the two
    issues noted above without any regressions.
    
    gcc/
            * config/mcore/mcore.h (ASM_OUT_ADDR_DIFF_ELT): Remove.

Diff:
---
 gcc/config/mcore/mcore.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/gcc/config/mcore/mcore.h b/gcc/config/mcore/mcore.h
index f8e718ad5fba..b25718e8798f 100644
--- a/gcc/config/mcore/mcore.h
+++ b/gcc/config/mcore/mcore.h
@@ -654,11 +654,6 @@ extern long mcore_current_compilation_timestamp;
 #define ASM_OUTPUT_CASE_LABEL(STREAM,PREFIX,NUM,TABLE) \
   fprintf (STREAM, "\t.align 2\n.%s%d:\n", PREFIX, NUM);
 
-/* Output a relative address. Not needed since jump tables are absolute
-   but we must define it anyway.  */
-#define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM,BODY,VALUE,REL)  \
-  fputs ("- - - ASM_OUTPUT_ADDR_DIFF_ELT called!\n", STREAM)
-
 /* Output an element of a dispatch table.  */
 #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM,VALUE)  \
     fprintf (STREAM, "\t.long\t.L%d\n", VALUE)

Reply via email to