]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
xtensa: Specify the pre-configured table array as const
authorTakayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>
Thu, 19 Mar 2026 22:59:16 +0000 (07:59 +0900)
committerMax Filippov <jcmvbkbc@gmail.com>
Fri, 20 Mar 2026 15:35:07 +0000 (08:35 -0700)
gcc/ChangeLog:

* config/xtensa/xtensa.cc (gen_int_relational):
Specify the table array "info" and the pointer to its elements
as const.

gcc/config/xtensa/xtensa.cc

index 4a9b156e0db729cd258e12957788d40ca68d4b26..235b4e0446d48337dfd0df34da0b2f76eaaebe52 100644 (file)
@@ -734,7 +734,7 @@ gen_int_relational (enum rtx_code test_code, /* relational test (EQ, etc) */
     int unsignedp;             /* != 0 for unsigned comparisons.  */
   };
 
-  static struct cmp_info info[ (int)ITEST_MAX ] = {
+  static const struct cmp_info info[ (int)ITEST_MAX ] = {
 
     { EQ,      xtensa_b4const_or_zero, 0, 0, 0, 0, 0 },        /* EQ  */
     { NE,      xtensa_b4const_or_zero, 0, 0, 0, 0, 0 },        /* NE  */
@@ -752,7 +752,7 @@ gen_int_relational (enum rtx_code test_code, /* relational test (EQ, etc) */
 
   enum internal_test test;
   machine_mode mode;
-  struct cmp_info *p_info;
+  const struct cmp_info *p_info;
   int invert;
 
   test = map_test_to_internal_test (test_code);