]> git.ipfire.org Git - thirdparty/gcc.git/commit
LoongArch: Fix ICE for illegal strings in the target attribute.
authorLulu Cheng <chenglulu@loongson.cn>
Tue, 14 Oct 2025 08:20:04 +0000 (16:20 +0800)
committerLulu Cheng <chenglulu@loongson.cn>
Tue, 11 Nov 2025 07:33:35 +0000 (15:33 +0800)
commitbb39433b51137c5786324b48e0a5ea075be52121
tree771b4fb5bf0b441880f60ab5d5c4bfc926f0abbb
parentcadbc011b9cf61738b3bbf409a285689c91d2223
LoongArch: Fix ICE for illegal strings in the target attribute.

Modify the two situations:

1. __attribute__ ((target ("arch")))
ICE will be reported before modification, and there will be an error
prompt after modification.

2. __attribute__ ((target ("arch=12345")))
Fixed the issue where the attribute string was not printed completely
in the previous error message.

gcc/ChangeLog:

* config/loongarch/loongarch-target-attr.cc
(loongarch_process_one_target_attr): Fix ICE.

gcc/testsuite/ChangeLog:

* gcc.target/loongarch/attr-check-error-message.c: Add tests.
gcc/config/loongarch/loongarch-target-attr.cc
gcc/testsuite/gcc.target/loongarch/attr-check-error-message.c