This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Internal Compiler Error in gen_rtx_SUBREG,at emit-rtl.c:776 in CR16
Sumanth Gundapaneni <Sumanth.Gundapaneni@kpitcummins.com> writes:
> However below mentioned is one of the test case that I was not able to
> resolve.
>
> struct test{
> int ia;
> char ca;
> float fa;
> };
>
> int main()
> {
> struct test testinst = {23, 'c', 12.34};
>
> return (int) &testinst;
> }
>
> Whenever a function returns a 32-bit address, the compiler crashes with
> internal compiler error: in instantiate_virtual_regs_in_insn, at function.c:1600
Line numbers don't help since our sources are not precisely the same as
your sources. In the future please show us a few lines around the point
you are describing.
> The rtl dump for return value "(insn 21 18 0 5 test.c:12 (use (reg/i:HI 0 r0)) -1 (nil))"
> which I believe should be SImode.
I don't know what the problem is but I think you should look at
PROMOTE_MODE and TARGET_PROMOTE_PROTOTYPES.
Ian