* gcc ICE (gcc 4.1.2, nios2), test program included
@ 2011-03-03 18:48 Frans Meulenbroeks
2011-03-03 21:44 ` Phil Blundell
0 siblings, 1 reply; 5+ messages in thread
From: Frans Meulenbroeks @ 2011-03-03 18:48 UTC (permalink / raw)
To: openembedded-devel
Dear all,
I've bumped onto an issue that I seem unable to resolv.
With gcc 4.1.2, target nios2, I get an ICE when compiling dbus:
I've reduced the failing program to a 16 line test program (using
repeated calls to delta and some hand reduction):
typedef struct DBusCredentials DBusCredentials;
typedef struct { } DBusAuthStateData;
typedef struct
{
const DBusAuthStateData *state;
DBusCredentials *authorized_identity;
} DBusAuth;
static const DBusAuthStateData common_state_authenticated = { };
_dbus_auth_set_credentials (DBusAuth *auth)
{
if (auth->state == &common_state_authenticated)
{
return auth->authorized_identity;
}
return auth->authorized_identity;
}
This gives (when compiled):
frans@frans-desktop:/tmp$
/home/frans/workspace/tmp/sysroots/x86_64-linux/usr/nios2/bin/nios2-linux-gcc
-fPIC -O2 -o tst.o tst.c
tst.c: In function '_dbus_auth_set_credentials':
tst.c:13: warning: return makes integer from pointer without a cast
tst.c:15: warning: return makes integer from pointer without a cast
tst.c:16: error: Attempt to delete prologue/epilogue insn:
(insn 55 54 56 0 (set:SI (reg:SI 22 r22)
(mem/c:SI (plus:SI (reg/f:SI 27 sp)
(const_int 0 [0x0])) [6 S4 A32])) -1 (nil)
(nil))
tst.c:16: internal compiler error: in propagate_one_insn, at flow.c:1699
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Anyone an idea on how to tackle this.
BTW: this applies with the nios code for gcc in OE, I have also tried
it with the latest altera version and I get the same problem.
Best regards, Frans.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gcc ICE (gcc 4.1.2, nios2), test program included
2011-03-03 18:48 gcc ICE (gcc 4.1.2, nios2), test program included Frans Meulenbroeks
@ 2011-03-03 21:44 ` Phil Blundell
2011-03-07 10:24 ` Frans Meulenbroeks
0 siblings, 1 reply; 5+ messages in thread
From: Phil Blundell @ 2011-03-03 21:44 UTC (permalink / raw)
To: openembedded-devel
On Thu, 2011-03-03 at 19:48 +0100, Frans Meulenbroeks wrote:
> Dear all,
>
> I've bumped onto an issue that I seem unable to resolv.
> With gcc 4.1.2, target nios2, I get an ICE when compiling dbus:
>
> [...]
>
> Anyone an idea on how to tackle this.
I'm not sure there's much to say about this really. An ICE is, more or
less by definition, a compiler bug in gcc, and the version you're
testing with is quite old now (by normal standards if not in the Altera
world). So your options would seem to be:
a) find a newer gcc and hope that it fixes the bug;
b) debug the failure for yourself (see the gcc manual and/or mailing
list for advice); or
c) persuade someone else, presumably one of the nios2 gcc maintainers,
to debug it.
p.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gcc ICE (gcc 4.1.2, nios2), test program included
2011-03-03 21:44 ` Phil Blundell
@ 2011-03-07 10:24 ` Frans Meulenbroeks
2011-03-07 10:53 ` Phil Blundell
0 siblings, 1 reply; 5+ messages in thread
From: Frans Meulenbroeks @ 2011-03-07 10:24 UTC (permalink / raw)
To: openembedded-devel
2011/3/3 Phil Blundell <philb@gnu.org>:
> On Thu, 2011-03-03 at 19:48 +0100, Frans Meulenbroeks wrote:
>> Dear all,
>>
>> I've bumped onto an issue that I seem unable to resolv.
>> With gcc 4.1.2, target nios2, I get an ICE when compiling dbus:
>>
>> [...]
>>
>> Anyone an idea on how to tackle this.
>
> I'm not sure there's much to say about this really. An ICE is, more or
> less by definition, a compiler bug in gcc, and the version you're
> testing with is quite old now (by normal standards if not in the Altera
> world). So your options would seem to be:
>
> a) find a newer gcc and hope that it fixes the bug;
Unfortunately there isn't one.
>
> b) debug the failure for yourself (see the gcc manual and/or mailing
> list for advice); or
Guess that is the road to travel. Maybe someone has some pointers on
how to get started with this.
>
> c) persuade someone else, presumably one of the nios2 gcc maintainers,
> to debug it.
Unfortunately such maintainer does not seem to exist.
The nios2 port was done by windriver. I'm speculating that this was
contract work for Altera. There does not seem to be an active
maintainer. That is probably also why there is no newer version.
I've encountered the error in dbus; there I managed to develop a patch
to dbus that avoids triggering the bug.
However with bitbake -k console-image I see the problem also occurs in
jasper and tiff:
jpc_t1cod.c: In function 'jpc_getmagctxno':
jpc_t1cod.c:447: error: Attempt to delete prologue/epilogue insn:
(insn 76 75 77 0 jpc_t1cod.c:436 (set (reg:SI 22 r22)
(plus:SI (reg:SI 22 r22)
(reg:SI 8 r8))) -1 (nil)
(nil))
jpc_t1cod.c:447: internal compiler error: in propagate_one_insn, at flow.c:1699
tif_ojpeg.c:2078: error: Attempt to delete prologue/epilogue insn:
(insn 171 170 172 8 tif_ojpeg.c:2078 (set:SI (reg:SI 22 r22)
(mem/c:SI (plus:SI (reg/f:SI 27 sp)
(const_int 8 [0x8])) [110 S4 A32])) -1 (nil)
(nil))
tif_ojpeg.c:2078: internal compiler error: in propagate_one_insn, at flow.c:1699
Frans.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gcc ICE (gcc 4.1.2, nios2), test program included
2011-03-07 10:24 ` Frans Meulenbroeks
@ 2011-03-07 10:53 ` Phil Blundell
2011-03-07 11:24 ` Frans Meulenbroeks
0 siblings, 1 reply; 5+ messages in thread
From: Phil Blundell @ 2011-03-07 10:53 UTC (permalink / raw)
To: openembedded-devel
On Mon, 2011-03-07 at 11:24 +0100, Frans Meulenbroeks wrote:
> > b) debug the failure for yourself (see the gcc manual and/or mailing
> > list for advice); or
>
> Guess that is the road to travel. Maybe someone has some pointers on
> how to get started with this.
I guess the obvious places to start would be the GCC internals manual:
http://gcc.gnu.org/onlinedocs/gccint/
and the GCC wiki:
http://gcc.gnu.org/wiki/
In particular http://gcc.gnu.org/wiki/DebuggingGCC has some tips for
running the compiler under the debugger.
p.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gcc ICE (gcc 4.1.2, nios2), test program included
2011-03-07 10:53 ` Phil Blundell
@ 2011-03-07 11:24 ` Frans Meulenbroeks
0 siblings, 0 replies; 5+ messages in thread
From: Frans Meulenbroeks @ 2011-03-07 11:24 UTC (permalink / raw)
To: openembedded-devel
2011/3/7 Phil Blundell <philb@gnu.org>:
> On Mon, 2011-03-07 at 11:24 +0100, Frans Meulenbroeks wrote:
>> > b) debug the failure for yourself (see the gcc manual and/or mailing
>> > list for advice); or
>>
>> Guess that is the road to travel. Maybe someone has some pointers on
>> how to get started with this.
>
> I guess the obvious places to start would be the GCC internals manual:
>
> http://gcc.gnu.org/onlinedocs/gccint/
>
> and the GCC wiki:
>
> http://gcc.gnu.org/wiki/
>
> In particular http://gcc.gnu.org/wiki/DebuggingGCC has some tips for
> running the compiler under the debugger.
Thanks, I hope that'll get me started. Actually ofc I know the
internals doc but was not aware of the wiki debugging page.
Frans
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-03-07 11:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-03 18:48 gcc ICE (gcc 4.1.2, nios2), test program included Frans Meulenbroeks
2011-03-03 21:44 ` Phil Blundell
2011-03-07 10:24 ` Frans Meulenbroeks
2011-03-07 10:53 ` Phil Blundell
2011-03-07 11:24 ` Frans Meulenbroeks
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.