summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/initialization_7.f90
diff options
context:
space:
mode:
authordfranke <dfranke@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-22 16:31:11 +0000
committerdfranke <dfranke@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-22 16:31:11 +0000
commitf8493bd259264b02d8aa4ab75b24836497a55d00 (patch)
tree897c943e7e0ac632965a6aad7afcb4a9cdfc6087 /gcc/testsuite/gfortran.dg/initialization_7.f90
parent8826a863f1b32186c8efcbf5e9ee09dacfd0c8e7 (diff)
downloadgcc-f8493bd259264b02d8aa4ab75b24836497a55d00.tar.gz
gcc/fortran:
2007-07-22 Daniel Franke <franke.daniel@gmail.com> PR fortran/29962 PR fortran/31253 PR fortran/31265 PR fortran/31639 * gfortran.h (gfc_intrinsic_sym): Changed members elemental, pure, generic, specific, actual_ok, noreturn into bits of a bitfield, added bits for inquiry, transformational, conversion. * check.c (non_init_transformational): Removed, removed all callers. * intrinsic.c (enum class): New. (add_sym*): Replaced argument elemetal by enum class. Changed all callers. (add_functions): Assign appropriate classes to intrinsic functions. (add_subroutines): Assign appropriate classes to intrinsic subroutines. (add_conv): Set conversion attribute. (gfc_init_expr_extensions): Removed, removed all callers. (gfc_intrinsic_func_interface): Reimplemented check for non-standard initializatione expressions. * expr.c (check_specification_function): New. (gfc_is_constant_expr): Added check for specification functions. (check_init_expr_arguments): New. (check_inquiry): Changed return value to MATCH, added checks for inquiry functions defined by F2003. (check_transformational): New. (check_null): New. (check_elemental): New. (check_conversion): New. (check_init_expr): Call new check functions, add more specific error messages. gcc/testsuite: 2007-07-22 Daniel Franke <franke.daniel@gmail.com> PR fortran/29962 * gfortran.dg/array_initializer_1.f90: Removed warning. * gfortran.dg/initialization_1.f90: Adjusted messages. * gfortran.dg/nested_modules_6.f90: Removed warning. PR fortran/31253 * gfortran.dg/initialization_7.f90: New test. PR fortran/31639 * gfortran.dg/initialization_8.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126826 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gfortran.dg/initialization_7.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/initialization_7.f9013
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/initialization_7.f90 b/gcc/testsuite/gfortran.dg/initialization_7.f90
new file mode 100644
index 00000000000..7f5ee315cf2
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/initialization_7.f90
@@ -0,0 +1,13 @@
+! { dg-do compile }
+!
+! PR fortran/31253 -- ICE on invlid initialization expression
+! Contributed by: Mikael Morin <mikael DOT morin AT tele2 DOT fr>
+!
+
+subroutine probleme(p)
+ real(kind=8), dimension(:) :: p
+ integer :: nx = size(p, 1) ! { dg-error "deferred array" }
+ integer :: nix
+
+ nix = nx
+end subroutine