Module Name: src
Committed By: mrg
Date: Mon Apr 20 21:57:22 UTC 2020
Modified Files:
src/external/gpl3/gcc/dist/gcc/common/config/aarch64: aarch64-common.c
Log Message:
when sorting all_extensions_by_on[] be sure to keep the NULL
entry last. correct the sizeof() to use the right variable
(they were the same size at least.) as-was, with the NULL
entry first, all loops across this array were no-ops.
this should fix PR#55158's arm64 side.
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.6 -r1.2 \
src/external/gpl3/gcc/dist/gcc/common/config/aarch64/aarch64-common.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl3/gcc/dist/gcc/common/config/aarch64/aarch64-common.c
diff -u src/external/gpl3/gcc/dist/gcc/common/config/aarch64/aarch64-common.c:1.1.1.6 src/external/gpl3/gcc/dist/gcc/common/config/aarch64/aarch64-common.c:1.2
--- src/external/gpl3/gcc/dist/gcc/common/config/aarch64/aarch64-common.c:1.1.1.6 Wed Mar 11 08:16:31 2020
+++ src/external/gpl3/gcc/dist/gcc/common/config/aarch64/aarch64-common.c Mon Apr 20 21:57:22 2020
@@ -285,9 +285,9 @@ aarch64_option_init_struct (struct gcc_o
to calculate the feature strings is called on every options push,
pop and attribute change (arm_neon headers, lto etc all cause this to
happen quite frequently). It is a trade-off between time and space and
- so time won. */
+ so time won. Keep NULL entry last. */
int n_extensions
- = sizeof (all_extensions) / sizeof (struct aarch64_option_extension);
+ = sizeof (all_extensions_by_on) / sizeof (all_extensions_by_on[0]) - 1;
qsort (&all_extensions_by_on, n_extensions,
sizeof (struct aarch64_option_extension), opt_ext_cmp);
}