This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/72738] internal compiler error: in expand_shift_1, at expmed.c:2318
- From: "noloader at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 28 Jul 2016 11:20:23 +0000
- Subject: [Bug target/72738] internal compiler error: in expand_shift_1, at expmed.c:2318
- Auto-submitted: auto-generated
- References: <bug-72738-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72738
--- Comment #2 from Jeffrey Walton <noloader at gmail dot com> ---
(In reply to James Greenhalgh from comment #1)
> Testcase needs a #include <stdbool.h> to compile, but otherwise confirmed
> from GCC 4.9 through to trunk.
>
> Note that it isn't immediately clear that this is valid code - operations on
> poly128_t other than vreinterpret, vldrq, and vstrq are not defined by ACLE,
> so the equality/inequality operators have no defined meaning (though ICEing
> is still not correct).
Ah, that's interesting. There were no warnings or diagnostics with -Wall
-Wextra (see below).
All my test platforms arrived at the correct result. I assumed GCC was doing
the right thing and generating code to compare elements for equality.
After the crash on Aarch32, I immediately started started looking at that
comparison. We have other code following the same dodgy pattern. Thanks for
helping with the test case.
**********
$ gcc -Wall -Wextra -march=armv8-a+crc -mtune=cortex-a53
-mfpu=crypto-neon-fp-armv8 -fPIC test.cc -o test.out
test.cc: In function ‘int main(int, char**)’:
test.cc:5:17: warning: variable ‘result’ set but not used
[-Wunused-but-set-variable]
volatile bool result = true;
^
test.cc: At global scope:
test.cc:3:14: warning: unused parameter ‘argc’ [-Wunused-parameter]
int main(int argc, char* argv[])
^
test.cc:3:31: warning: unused parameter ‘argv’ [-Wunused-parameter]
int main(int argc, char* argv[])
^
test.cc: In function ‘int main(int, char**)’:
test.cc:10:16: internal compiler error: in expand_shift_1, at expmed.c:2318
result = (r1 != r2);
^
Please submit a full bug report,