summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-21 21:20:07 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-21 21:20:07 +0000
commit2cdf5987c235a29f5c63177ab5f9a2b5f96c2f03 (patch)
treef93a8619f89a854ac49ab65ed278a4b41075e48e
parentddc90d8846c96a8d60e5c145f71985dd9baa2fe7 (diff)
downloadgcc-2cdf5987c235a29f5c63177ab5f9a2b5f96c2f03.tar.gz
PR fortran/43836
* f95-lang.c (gfc_define_builtin): Set TREE_NOTHROW on the decl. * gfortran.dg/gomp/pr43836.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158619 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/f95-lang.c3
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr43836.f9010
4 files changed, 23 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 86cedc9466c..27dab6d6dda 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2010-04-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/43836
+ * f95-lang.c (gfc_define_builtin): Set TREE_NOTHROW on
+ the decl.
+
2010-04-20 Harald Anlauf <anlauf@gmx.de>
* intrinsic.c (sort_actual): Remove 'is' in error message.
diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c
index 96ff8bb2ef3..8efa6de679b 100644
--- a/gcc/fortran/f95-lang.c
+++ b/gcc/fortran/f95-lang.c
@@ -1,5 +1,5 @@
/* gfortran backend interface
- Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010
Free Software Foundation, Inc.
Contributed by Paul Brook.
@@ -608,6 +608,7 @@ gfc_define_builtin (const char *name,
library_name, NULL_TREE);
if (const_p)
TREE_READONLY (decl) = 1;
+ TREE_NOTHROW (decl) = 1;
built_in_decls[code] = decl;
implicit_built_in_decls[code] = decl;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index f30277cf8ad..2e6da4e7583 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2010-04-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/43836
+ * gfortran.dg/gomp/pr43836.f90: New test.
+
2010-04-21 Richard Guenther <rguenther@suse.de>
* gcc.dg/ipa/ipa-pta-11.c: Adjust.
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr43836.f90 b/gcc/testsuite/gfortran.dg/gomp/pr43836.f90
new file mode 100644
index 00000000000..cf86523f52b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/pr43836.f90
@@ -0,0 +1,10 @@
+! PR fortran/43836
+! { dg-do compile }
+! { dg-options "-fopenmp -fexceptions -O2" }
+subroutine foo
+!$omp single
+!$omp parallel
+ call bar
+!$omp end parallel
+!$omp end single
+end subroutine foo