Hello. I have a mainframe operating system called z/PDOS-generic available from https://pdos.org
I have ported a slightly modified gcc 3.2.3 (called gccmvs) to it, and when run under Hercules/380 (mainframe emulator) it works fine and gccmvs is able to reproduce itself byte-exact. But I have a new emulator called mfemul.c, and it isn't very mature and almost certainly has a bug in it that is affecting gcc 3.2.3. And since that is the only known issue at this stage, this is where I am trying to debug, which means delving into the internals of gcc to some degree. Since I have a good (both PC and Hercules/380) version and a bad version, I can put in printf to compare what is happening, without actually having to understand the internals. However, I'm not sure where to get started on this one. I do know the "-da" and that has shown that between: tempr.c.22.postreload and tempr.c.23.flow2 this "plus" has gone away: (insn 84 15 16 (set (reg/v:SI 3 3 [27]) (mem/f:SI (plus:SI (reg/f:SI 11 11) (const_int 4 [0x4])) [3 ymode+0 S4 A32])) 15 {movsi} (nil) (expr_list:REG_EQUIV (mem/f:SI (plus:SI (reg/f:SI 11 11) (const_int 4 [0x4])) [3 ymode+0 S4 A32]) (nil))) (it's still there on the PC) This is the code I am compiling: D:\devel\gcc\gcc>type tempr.c extern unsigned char mode_size[50]; int foo(int xmode, int ymode) { int mode_multiple; mode_multiple = mode_size[xmode] / mode_size[ymode]; if (mode_multiple == 0) { for (;;) ; } return 0; } D:\devel\gcc\gcc> which is stripped down from: mode_multiple = GET_MODE_SIZE (xmode) / GET_MODE_SIZE (ymode); if (mode_multiple == 0) in function: unsigned int subreg_regno_offset (xregno, xmode, offset, ymode) of rtlanal.c And yes, I know gcc 3.2.3 is long out of support, but I'm interested in the i370 target which no longer exists. Any suggestions on where to stick some printfs so that I can start looking for a divergence, given that the generated code is meant to be identical, with the possible exception of register selection which is dependent on floating point calculations, and the floating point is known to differ on my different environments? (because the PC uses IEEE, Hercules has proper IBM hex float, and mfemul has bastardized IBM hex float which you can see below if interested - but unrelated to my question). https://sourceforge.net/p/pdos/gitcode/ci/master/tree/util/mfemul.c Thanks. Paul.