On 2/27/2026 4:42 PM, H.J. Lu wrote:
Note you broke mcore-elf in new and interesting ways.
Tests that now fail, but worked before (2 tests):
mcore-sim: gcc: gcc.dg/tree-ssa/pr84436-5.c execution test
mcore-sim: gcc: gcc.dg/tree-ssa/pr84436-5.c execution test
How does it fail?
It calls abort because it computes the wrong answer, just like most of
the other tests in the testsuite.
Slightly simplified:
signed char
__attribute__ ((noipa))
foo (signed char how)
{
switch (how) {
case -4: how = 96; break;
case -3: how = -120; break;
case -2: how = -80; break;
case -1: how = -40; break;
case 0: how = 0; break;
case 1: how = 40; break;
}
return how;
}
int main()
{
if (foo (-3) != -120)
__builtin_abort ();
return 0;
}
Compile with -O2. When linked and run with the gdb simulator it'll
exit with a nonzero status due to the abort call.
Before your change:
root@131a4babcd13:/home/jlaw/jenkins/workspace/mcore-elf/mcore-elf-obj/gcc/gcc#
./xgcc -B./ -O2 j.c -c && mcore-elf-gcc j.o && mcore-elf-run ./a.out ;
echo $?
0
After your change:
./xgcc -B./ -O2 j.c -c && mcore-elf-gcc j.o && mcore-elf-run ./a.out ;
echo $?
6
You'll need to the rest of the debugging yourself.
And you broke iq2000-elf: Tests that now fail, but worked before (99 tests):
iq2000-sim: gcc: c-c++-common/pr111309-1.c -Wc++-compat execution test
[ ... ]
This patch doesn't change iq2000.
I'll try to reconfirm this. But the mcore issue is definitely a result
of your patch, I checked it again tonight.
jeff