gcc-torture-execute-divcmp-1 fails to compile and aborts with an illegal instruction exception for at least the stm8 and s08 backends on NetBSD 6.1 on Sparc64.
Debugging the dumped core shows:
Reading symbols from /home/epetrich/sdccbuild/bin/sdcc...done.
[New process 1]
Core was generated by `sdcc'.
Program terminated with signal 4, Illegal instruction.
#0 tree_dec_ralloc_nodes<boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, tree_dec_node>, boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, cfg_node>, boost::adjacency_matrix<boost::undirectedS, con_node> > (T=..., t=<optimized out>, G=..., I=..., ac=...,
assignment_optimal=0x100000000)
at ../../../sdcc/src/stm8/../SDCCralloc.hpp:979
979 static void tree_dec_ralloc_nodes(T_t &T, typename boost::graph_traits<T_t>::vertex_descriptor t, const G_t &G, const I_t &I, const assignment& ac, bool *const assignment_optimal)
(gdb) bt
#0 tree_dec_ralloc_nodes<boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, tree_dec_node>, boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, cfg_node>, boost::adjacency_matrix<boost::undirectedS, con_node> > (T=..., t=<optimized out>, G=..., I=..., ac=...,
assignment_optimal=0x100000000)
at ../../../sdcc/src/stm8/../SDCCralloc.hpp:979
#1 0x0000000100000008 in ?? ()
#2 0x0000000100000008 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
I also reproduce this crash of sdcc(.exe) on cygwin64.
Last edit: Ben Shi 2016-05-01
on cygwin64, it crashed at the recursive call of tree_dec_ralloc_nodes, and the nested level is too deep. but actually cygwin32 was ok with such depth.
This test case on cygwin64 was fixed in reversion #9300.
Last edit: Ben Shi 2016-05-01
The stack size is enlarged to 4MB in runtime, but I am not sure if it is OK for other platforms. Otherwise I will roll back it if there are failures in tomorrow's regression tests.
Does anyone have a NetBSD sparc64 machine to check if this bug still exists in current SDCC?
Philipp
It will take me a little bit to set it back up, but I do have a sparc64 with NetBSD. I will check if this bug is still reproducable.
Does this problem still exist in current SDCC?
It has been 8 years since the bug report. Apparently no one has a NetBSD on sparc64 machine around. SDCC has changed much since, so I'll close this as out of date. Is someone can reproduce it using current SDCC, please reopen the ticket.