1 From 7cc702c7b5a1ccc2b0091f3effa1391b6c3030fd Mon Sep 17 00:00:00 2001
2 From: Hongxu Jia <hongxu.jia@windriver.com>
3 Date: Wed, 16 Aug 2017 10:46:28 +0800
4 Subject: [PATCH 3/4] tests/bench-slope.c: workaround ICE failure on mips with
7 Hit a ICE and could reduce it to the following minimal example:
9 1. Only the size of array assigned with 2 caused the issue:
10 $ cat > mipgcc-test.c << END
12 int main (int argc, char **argv)
14 char *pStrArry[ARRAY_SIZE_MAX] = {"hello"};
17 while(pStrArry[i] && i<ARRAY_SIZE_MAX)
19 printf("%s\n", pStrArry[i]);
28 2. Only -O1 and -g on mips caused the issue:
29 $ mips-poky-linux-gcc -O1 -g -o mipgcc-test mipgcc-test.c
30 mipgcc-test.c: In function 'main':
31 mipgcc-test.c:18:1: internal compiler error: in dwarf2out_var_location,
35 Please submit a full bug report,
36 with preprocessed source if appropriate.
37 See <http://gcc.gnu.org/bugs.html> for instructions
39 3. The quick workround is trying to enlarge the size of array with
43 4. File a bug to GNU, but it could not be reproduced on there
45 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60643
47 Upstream-Status: Inappropriate [oe specific]
50 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
52 tests/bench-slope.c | 4 ++--
53 1 file changed, 2 insertions(+), 2 deletions(-)
55 diff --git a/tests/bench-slope.c b/tests/bench-slope.c
56 index 75e6e43..4e70842 100644
57 --- a/tests/bench-slope.c
58 +++ b/tests/bench-slope.c
59 @@ -1463,7 +1463,7 @@ static struct bench_ops hash_ops = {
63 -static struct bench_hash_mode hash_modes[] = {
64 +static struct bench_hash_mode hash_modes[3] = {
68 @@ -1629,7 +1629,7 @@ static struct bench_ops mac_ops = {
72 -static struct bench_mac_mode mac_modes[] = {
73 +static struct bench_mac_mode mac_modes[3] = {