From 714499a070680584eb01f8194c59a4d0ec2f187c Mon Sep 17 00:00:00 2001 From: Dominique d'Humieres Date: Sun, 2 Sep 2012 10:10:21 +0200 Subject: re PR target/36680 (ICE in spill_failure, reload1.c:1995) PR target/36680 * gfortran.dg/pr36680.f90: New test. Co-Authored-By: Uros Bizjak From-SVN: r190855 --- gcc/testsuite/ChangeLog | 7 +++++- gcc/testsuite/gfortran.dg/pr36680.f90 | 43 +++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gfortran.dg/pr36680.f90 (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5a66dc2..f027c28 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,9 +1,14 @@ +2012-09-02 Dominique Dhumieres + Uros Bizjak + + PR target/36680 + * gfortran.dg/pr36680.f90: New test. + 2012-09-02 Uros Bizjak PR target/42295 * g++.dg/opt/pr42295.C: New test. - 2012-09-01 Jakub Jelinek PR target/54436 diff --git a/gcc/testsuite/gfortran.dg/pr36680.f90 b/gcc/testsuite/gfortran.dg/pr36680.f90 new file mode 100644 index 0000000..b554b76 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr36680.f90 @@ -0,0 +1,43 @@ +! PR target/36680 +! { dg-do compile { target i?86-*-* x86_64-*-* } } +! { dg-options "-O1 -fschedule-insns" } + +MODULE class_dummy_atom_kdtree_types + TYPE dummy_atom_kdtree_data + INTEGER :: dummy + END TYPE + + TYPE :: dummy_atom_kdtree_node + TYPE(dummy_atom_kdtree_node_private), POINTER :: p + END TYPE + + TYPE :: dummy_atom_kdtree_node_private + TYPE(dummy_atom_kdtree_data) :: data + END TYPE + + TYPE :: dummy_atom_kdtree + TYPE(dummy_atom_kdtree_node) :: root + END TYPE +END MODULE + +FUNCTION dummy_atom_kdtree_insert(this, item) + USE class_dummy_atom_kdtree_types + + TYPE(dummy_atom_kdtree), INTENT(inout) :: this + TYPE(dummy_atom_kdtree_data), INTENT(in) :: item + + TYPE(dummy_atom_kdtree_node) :: parent, current + INTEGER :: cmp, level, discriminator + + parent = dummy_atom_kdtree_node(null()) + current = this%root + level = 1 + discriminator = 1 + + DO WHILE (ASSOCIATED( current%p )) + discriminator = MODULO(level-1, 3) + 1 + cmp = dummy_atom_kdtree_data_compare(item, current%p%data, discriminator) + level = level + 1 + END DO + +END FUNCTION -- cgit v1.1