mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-22 03:46:53 -05:00
re PR middle-end/30147 (ICE in fold_convert with -O2)
2006-12-12 Richard Guenther <rguenther@suse.de> PR middle-end/30147 * fold-const.c (fold_read_from_constant_string): Only fold read from constant string if the result type is integer. * gfortran.fortran-torture/compile/pr30147.f90: New testcase. From-SVN: r119777
This commit is contained in:
committed by
Richard Biener
parent
4c05253be4
commit
7491c0210d
@@ -1,3 +1,9 @@
|
||||
2006-12-12 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/30147
|
||||
* fold-const.c (fold_read_from_constant_string): Only fold read
|
||||
from constant string if the result type is integer.
|
||||
|
||||
2006-12-09 Maxim Kuvyrkov <mkuvyrkov@ispras.ru>
|
||||
|
||||
* haifa-sched.c (schedule_block): Remove excessive sanity check.
|
||||
|
||||
@@ -12406,7 +12406,9 @@ fold_unary_to_constant (enum tree_code code, tree type, tree op0)
|
||||
tree
|
||||
fold_read_from_constant_string (tree exp)
|
||||
{
|
||||
if (TREE_CODE (exp) == INDIRECT_REF || TREE_CODE (exp) == ARRAY_REF)
|
||||
if ((TREE_CODE (exp) == INDIRECT_REF
|
||||
|| TREE_CODE (exp) == ARRAY_REF)
|
||||
&& TREE_CODE (TREE_TYPE (exp)) == INTEGER_TYPE)
|
||||
{
|
||||
tree exp1 = TREE_OPERAND (exp, 0);
|
||||
tree index;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
2006-12-12 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/30147
|
||||
* gfortran.fortran-torture/compile/pr30147.f90: New testcase.
|
||||
|
||||
2006-12-11 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/29732
|
||||
|
||||
14
gcc/testsuite/gfortran.fortran-torture/compile/pr30147.f90
Normal file
14
gcc/testsuite/gfortran.fortran-torture/compile/pr30147.f90
Normal file
@@ -0,0 +1,14 @@
|
||||
MODULE input_cp2k_motion
|
||||
IMPLICIT NONE
|
||||
interface
|
||||
SUBROUTINE keyword_create(variants)
|
||||
CHARACTER(len=*), DIMENSION(:), &
|
||||
INTENT(in) :: variants
|
||||
end subroutine
|
||||
end interface
|
||||
CONTAINS
|
||||
SUBROUTINE create_neb_section()
|
||||
CALL keyword_create(variants=(/"K"/))
|
||||
END SUBROUTINE create_neb_section
|
||||
END MODULE input_cp2k_motion
|
||||
|
||||
Reference in New Issue
Block a user