* [nios2, committed] fix bad assertion
@ 2015-06-29 17:18 Sandra Loosemore
2016-05-21 8:30 ` Chung-Lin Tang
0 siblings, 1 reply; 2+ messages in thread
From: Sandra Loosemore @ 2015-06-29 17:18 UTC (permalink / raw)
To: GCC Patches; +Cc: Chung-Lin Tang
[-- Attachment #1: Type: text/plain, Size: 844 bytes --]
When I was preparing to regression-test something else in a
nios2-linux-gnu build, I discovered it was ICE'ing while building shared
libraries with -fpic (glibc, libgomp). I tracked this down to having
started with r224048, but on further investigation I decided that commit
merely exposed a latent bug.
The trouble is that the assertion in nios2_delegitimize_address is too
restrictive compared to what nios2_legitimize_address can produce. It's
expecting to find a SYMBOL_REF underneath but in one case it was
crashing on a LABEL_REF (for a computed goto), and in another case it
was a symbol + offset expression which is even documented with a big
block of comments in nios2_legitimize_address. I've checked in this
patch to relax the assertion; it allows the toolchain to build again,
and test results look decent.
-Sandra
[-- Attachment #2: gcc-unspec.log --]
[-- Type: text/x-log, Size: 148 bytes --]
2015-06-29 Sandra Loosemore <sandra@codesourcery.com>
gcc/
* config/nios2/nios2.c (nios2_delegitimize_address): Make
assert less restrictive.
[-- Attachment #3: gcc-unspec.patch --]
[-- Type: text/x-patch, Size: 438 bytes --]
Index: gcc/config/nios2/nios2.c
===================================================================
--- gcc/config/nios2/nios2.c (revision 225094)
+++ gcc/config/nios2/nios2.c (working copy)
@@ -1920,7 +1920,7 @@ nios2_delegitimize_address (rtx x)
case UNSPEC_LOAD_TLS_IE:
case UNSPEC_ADD_TLS_LE:
x = XVECEXP (XEXP (x, 0), 0, 0);
- gcc_assert (GET_CODE (x) == SYMBOL_REF);
+ gcc_assert (CONSTANT_P (x));
break;
}
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [nios2, committed] fix bad assertion
2015-06-29 17:18 [nios2, committed] fix bad assertion Sandra Loosemore
@ 2016-05-21 8:30 ` Chung-Lin Tang
0 siblings, 0 replies; 2+ messages in thread
From: Chung-Lin Tang @ 2016-05-21 8:30 UTC (permalink / raw)
To: Sandra Loosemore, GCC Patches; +Cc: Marek Vasut
On 2015/6/30 1:01 AM, Sandra Loosemore wrote:
> When I was preparing to regression-test something else in a nios2-linux-gnu build, I discovered it was ICE'ing while building
> shared libraries with -fpic (glibc, libgomp). I tracked this down to having started with r224048, but on further investigation
> I decided that commit merely exposed a latent bug.
>
> The trouble is that the assertion in nios2_delegitimize_address is too restrictive compared to what nios2_legitimize_address can
> produce. It's expecting to find a SYMBOL_REF underneath but in one case it was crashing on a LABEL_REF (for a computed goto),
> and in another case it was a symbol + offset expression which is even documented with a big block of comments in
> nios2_legitimize_address. I've checked in this patch to relax the assertion; it allows the toolchain to build again, and test
> results look decent.
>
> -Sandra
>
This was backported to gcc-5-branch, to fix that ICE Marek encountered.
Chung-Lin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-05-21 8:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-29 17:18 [nios2, committed] fix bad assertion Sandra Loosemore
2016-05-21 8:30 ` Chung-Lin Tang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).