aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2007-12-06 06:11:01 +0000
committerPaul Thomas <pault@gcc.gnu.org>2007-12-06 06:11:01 +0000
commit95f8fb2500cca5b71a784ba7c2df8347eb477930 (patch)
tree3637c89887b7e1d094503d04ba2910f5c0268361 /gcc
parent98b2c759a1d6777cede9f2815ee535eae022ccd2 (diff)
downloadgcc-95f8fb2500cca5b71a784ba7c2df8347eb477930.zip
gcc-95f8fb2500cca5b71a784ba7c2df8347eb477930.tar.gz
gcc-95f8fb2500cca5b71a784ba7c2df8347eb477930.tar.bz2
re PR target/34435 (SSE2 intrinsics - emmintrin with optimisations off and type conversion error)
2007-12-06 Paul Thomas <pault@gcc.gnu.org> PR fortran/34435 * module.c (find_symbol): Do not return symtrees with unique names, which shows that they are private. 2007-12-06 Paul Thomas <pault@gcc.gnu.org> PR fortran/34435 * gfortran.dg/used_types_19.f90: New test. From-SVN: r130642
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/module.c3
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_19.f9026
4 files changed, 39 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 3b290ac..5d59c89 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2007-12-06 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/34435
+ * module.c (find_symbol): Do not return symtrees with unique
+ names, which shows that they are private.
+
2007-12-05 Jakub Jelinek <jakub@redhat.com>
PR debug/33739
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index af81c3a..c48bc68 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -3153,7 +3153,8 @@ find_symbol (gfc_symtree *st, const char *name,
c = strcmp (name, st->n.sym->name);
if (c == 0 && st->n.sym->module
- && strcmp (module, st->n.sym->module) == 0)
+ && strcmp (module, st->n.sym->module) == 0
+ && !check_unique_name (st->name))
{
if ((!generic && !st->n.sym->attr.generic)
|| (generic && st->n.sym->attr.generic))
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index f2fcadb..b19a448 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2007-12-06 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/34435
+ * gfortran.dg/used_types_19.f90: New test.
+
2007-12-06 Kaz Kojima <kkojima@gcc.gnu.org>
* gfortran.dg/nan_2.f90: Add -mieee for sh.
diff --git a/gcc/testsuite/gfortran.dg/used_types_19.f90 b/gcc/testsuite/gfortran.dg/used_types_19.f90
new file mode 100644
index 0000000..dbec8dc
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/used_types_19.f90
@@ -0,0 +1,26 @@
+! { dg-do compile }
+! Tests the fix for PR34335 a regression in which the PRIVATE attribute
+! of type(a) in module b would be ignored and would prevent it being
+! loaded in the main program.
+!
+! Contributed by Janus Weil <jaydub66@gmail.com>
+!
+module A
+ type A_type
+ real comp
+ end type
+end module A
+
+module B
+ use A
+ private
+ type(A_type) :: B_var
+ public:: B_var
+end module B
+
+program C
+ use B
+ use A
+ type(A_type):: A_var
+end program C
+! { dg-final { cleanup-modules "a b" } }