This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR rtl-optimization/54157: [x32] -maddress-mode=long failures


"H.J. Lu" <hongjiu.lu@intel.com> writes:
> We have
>
> (gdb) r -fpreprocessed x.i -quiet -dumpbase x.i -mx32
> -maddress-mode=long -mtune=generic -march=x86-64 -auxbase x -O2 -version
> -ftree-vectorize -o x.s
> Starting program: /export/build/gnu/gcc-x32/build-x86_64-linux/gcc/cc1
> -fpreprocessed x.i -quiet -dumpbase x.i -mx32 -maddress-mode=long
> -mtune=generic -march=x86-64 -auxbase x -O2 -version -ftree-vectorize -o
> x.s
> GNU C (GCC) version 4.8.0 20120801 (experimental)
> (x86_64-unknown-linux-gnu)
> 	compiled by GNU C version 4.7.1 20120629 (Red Hat 4.7.1-1), GMP
> version 5.0.2, MPFR version 3.1.0, MPC version 0.9
> GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
> GNU C (GCC) version 4.8.0 20120801 (experimental)
> (x86_64-unknown-linux-gnu)
> 	compiled by GNU C version 4.7.1 20120629 (Red Hat 4.7.1-1), GMP
> version 5.0.2, MPFR version 3.1.0, MPC version 0.9
> GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
> Compiler executable checksum: 07a4e516c4e8fe4abfdafa83737d8f4a
>
> Breakpoint 1, fancy_abort (
>     file=0x130fe68 "/export/gnu/import/git/gcc/gcc/explow.c", line=88, 
>     function=0x131032e <__FUNCTION__.39220> "plus_constant")
>     at /export/gnu/import/git/gcc/gcc/diagnostic.c:1011
> 1011	  internal_error ("in %s, at %s:%d", function, trim_filename
> (file), line);
> (gdb) f 1
> #1  0x0000000000743e07 in plus_constant (mode=DImode, x=0x7ffff106a7e0, 
>     c=99452) at /export/gnu/import/git/gcc/gcc/explow.c:88
> 88	  gcc_assert (GET_MODE (x) == VOIDmode || GET_MODE (x) == mode);
> (gdb) f 2
> #2  0x0000000000adc4b1 in simplify_binary_operation_1 (code=PLUS,
> mode=DImode, 
>     op0=0x7ffff106a7e0, op1=0x7ffff1010e80, trueop0=0x7ffff106a7e0, 
>     trueop1=0x7ffff1010e80)
>     at /export/gnu/import/git/gcc/gcc/simplify-rtx.c:1956
> 1956		return plus_constant (mode, op0, INTVAL (op1));
> (gdb) call debug_rtx (op0)
> (symbol_ref:SI ("tmp2") <var_decl 0x7ffff0f06140 tmp2>)
> (gdb) call debug_rtx (op1)
> (const_int 99452 [0x1847c])
> (gdb) bt
> #0  fancy_abort (file=0x130fe68
> "/export/gnu/import/git/gcc/gcc/explow.c", 
>     line=88, function=0x131032e <__FUNCTION__.39220> "plus_constant")
>     at /export/gnu/import/git/gcc/gcc/diagnostic.c:1011
> #1  0x0000000000743e07 in plus_constant (mode=DImode, x=0x7ffff106a7e0, 
>     c=99452) at /export/gnu/import/git/gcc/gcc/explow.c:88
> #2  0x0000000000adc4b1 in simplify_binary_operation_1 (code=PLUS,
> mode=DImode, 
>     op0=0x7ffff106a7e0, op1=0x7ffff1010e80, trueop0=0x7ffff106a7e0, 
>     trueop1=0x7ffff1010e80)
>     at /export/gnu/import/git/gcc/gcc/simplify-rtx.c:1956
> #3  0x0000000000adc221 in simplify_binary_operation (code=PLUS,
> mode=DImode, 
>     op0=0x7ffff106a7e0, op1=0x7ffff1010e80)
>     at /export/gnu/import/git/gcc/gcc/simplify-rtx.c:1904

Things have already gone wrong by this frame: we have a DImode
addition of an SImode value, which isn't allowed.  Where does
that mismatch get introduced?

Richard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]