https://gcc.gnu.org/g:33d02f3f13cb9356c971ff75835758fc1fdb5dfd

commit r16-2693-g33d02f3f13cb9356c971ff75835758fc1fdb5dfd
Author: Georg-Johann Lay <a...@gjlay.de>
Date:   Thu Jul 31 18:31:33 2025 +0200

    AVR: Set .type of jump table label.
    
    gcc/
            * config/avr/avr.cc (avr_output_addr_vec) <labl>: Asm out its .type.

Diff:
---
 gcc/config/avr/avr.cc | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gcc/config/avr/avr.cc b/gcc/config/avr/avr.cc
index 94684468de39..1fb59b624de7 100644
--- a/gcc/config/avr/avr.cc
+++ b/gcc/config/avr/avr.cc
@@ -14418,6 +14418,13 @@ avr_output_addr_vec (rtx_insn *labl, rtx table)
   // Output the label that precedes the table.
 
   ASM_OUTPUT_ALIGN (stream, 1);
+
+  char s_labl[40];
+  targetm.asm_out.generate_internal_label (s_labl, "L",
+                                          CODE_LABEL_NUMBER (labl));
+  ASM_OUTPUT_TYPE_DIRECTIVE (stream, s_labl,
+                            AVR_HAVE_JMP_CALL ? "object" : "function");
+
   targetm.asm_out.internal_label (stream, "L", CODE_LABEL_NUMBER (labl));
 
   // Output the table's content.

Reply via email to