Check that result of string folding is of integral type.
gcc/ 2010-09-10 H.J. Lu <hongjiu.lu@intel.com> PR middle-end/45634 * tree-ssa-ccp.c (fold_const_aggregate_ref): Check that result of string folding is of integral type. gcc/testsuite/ 2010-09-10 H.J. Lu <hongjiu.lu@intel.com> PR middle-end/45634 * gfortran.fortran-torture/compile/pr45634.f90: New. From-SVN: r164183
This commit is contained in:
parent
e1d9659dd3
commit
9096633797
|
@ -1,3 +1,9 @@
|
|||
2010-09-10 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR middle-end/45634
|
||||
* tree-ssa-ccp.c (fold_const_aggregate_ref): Check that result
|
||||
of string folding is of integral type.
|
||||
|
||||
2010-09-10 Ryan Mansfield <rmansfield@qnx.com>
|
||||
|
||||
* doc/invoke.texi (-x): Fix typo.
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2010-09-10 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR middle-end/45634
|
||||
* gfortran.fortran-torture/compile/pr45634.f90: New.
|
||||
|
||||
2010-09-10 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* objc.dg/fobjc-exceptions.m: New test.
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
SUBROUTINE RCRDRD (VTYP)
|
||||
CHARACTER(4), INTENT(OUT) :: VTYP
|
||||
CHARACTER(1), SAVE :: DBL = "D"
|
||||
VTYP = DBL
|
||||
END
|
|
@ -1537,7 +1537,8 @@ fold_const_aggregate_ref (tree t)
|
|||
/* Fold read from constant string. */
|
||||
if (TREE_CODE (ctor) == STRING_CST)
|
||||
{
|
||||
if ((TYPE_MODE (TREE_TYPE (t))
|
||||
if (INTEGRAL_TYPE_P (TREE_TYPE (t))
|
||||
&& (TYPE_MODE (TREE_TYPE (t))
|
||||
== TYPE_MODE (TREE_TYPE (TREE_TYPE (ctor))))
|
||||
&& (GET_MODE_CLASS (TYPE_MODE (TREE_TYPE (TREE_TYPE (ctor))))
|
||||
== MODE_INT)
|
||||
|
|
Loading…
Reference in New Issue