mirror of git://gcc.gnu.org/git/gcc.git
				
				
				
			Fix random class_allocate_18.f90 failure
PR fortran/64921 gcc/fortran/ * class.c (generate_finalization_wrapper): Set finalization procedure symbol's always_explicit attribute. gcc/testsuite/ * gfortran.dg/class_allocate_20.f90: New. From-SVN: r226493
This commit is contained in:
		
							parent
							
								
									44fef04ab1
								
							
						
					
					
						commit
						2ab320ad36
					
				|  | @ -1,3 +1,9 @@ | ||||||
|  | 2015-08-03  Mikael Morin  <mikael@gcc.gnu.org> | ||||||
|  | 
 | ||||||
|  | 	PR fortran/64921 | ||||||
|  | 	* class.c (generate_finalization_wrapper): Set finalization | ||||||
|  | 	procedure symbol's always_explicit attribute. | ||||||
|  | 
 | ||||||
| 2015-08-01  Paul Thomas  <pault@gcc.gnu.org> | 2015-08-01  Paul Thomas  <pault@gcc.gnu.org> | ||||||
| 
 | 
 | ||||||
| 	PR fortran/67091 | 	PR fortran/67091 | ||||||
|  |  | ||||||
|  | @ -1599,6 +1599,7 @@ generate_finalization_wrapper (gfc_symbol *derived, gfc_namespace *ns, | ||||||
|   final->ts.type = BT_INTEGER; |   final->ts.type = BT_INTEGER; | ||||||
|   final->ts.kind = 4; |   final->ts.kind = 4; | ||||||
|   final->attr.artificial = 1; |   final->attr.artificial = 1; | ||||||
|  |   final->attr.always_explicit = 1; | ||||||
|   final->attr.if_source = expr_null_wrapper ? IFSRC_IFBODY : IFSRC_DECL; |   final->attr.if_source = expr_null_wrapper ? IFSRC_IFBODY : IFSRC_DECL; | ||||||
|   if (ns->proc_name->attr.flavor == FL_MODULE) |   if (ns->proc_name->attr.flavor == FL_MODULE) | ||||||
|     final->module = ns->proc_name->name; |     final->module = ns->proc_name->name; | ||||||
|  |  | ||||||
|  | @ -1,3 +1,8 @@ | ||||||
|  | 2015-08-03  Mikael Morin  <mikael@gcc.gnu.org> | ||||||
|  | 
 | ||||||
|  | 	PR fortran/64921 | ||||||
|  | 	* gfortran.dg/class_allocate_20.f90: New. | ||||||
|  | 
 | ||||||
| 2015-08-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com> | 2015-08-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com> | ||||||
| 
 | 
 | ||||||
| 	* gcc.target/aarch64/csel_bfx_1.c: New test. | 	* gcc.target/aarch64/csel_bfx_1.c: New test. | ||||||
|  |  | ||||||
|  | @ -0,0 +1,32 @@ | ||||||
|  | ! { dg-do run } | ||||||
|  | ! | ||||||
|  | ! PR fortran/64921 | ||||||
|  | ! Test that the finalization wrapper procedure get the always_explicit | ||||||
|  | ! attribute so that the array is not passed without descriptor from  | ||||||
|  | ! T3's finalization wrapper procedure to T2's one. | ||||||
|  | ! | ||||||
|  | ! Contributed by Mat Cross  <mathewc@nag.co.uk> | ||||||
|  | 
 | ||||||
|  | Program test | ||||||
|  |   Implicit None | ||||||
|  |   Type :: t1 | ||||||
|  |     Integer, Allocatable :: i | ||||||
|  |   End Type | ||||||
|  |   Type :: t2 | ||||||
|  |     Integer, Allocatable :: i | ||||||
|  |   End Type | ||||||
|  |   Type, Extends (t1) :: t3 | ||||||
|  |     Type (t2) :: j | ||||||
|  |   End Type | ||||||
|  |   Type, Extends (t3) :: t4 | ||||||
|  |     Integer, Allocatable :: k | ||||||
|  |   End Type | ||||||
|  |   Call s | ||||||
|  |   Print *, 'ok' | ||||||
|  | Contains | ||||||
|  |   Subroutine s | ||||||
|  |     Class (t1), Allocatable :: x | ||||||
|  |     Allocate (t4 :: x) | ||||||
|  |   End Subroutine | ||||||
|  | End Program | ||||||
|  | ! { dg-output "ok" } | ||||||
		Loading…
	
		Reference in New Issue
	
	 Mikael Morin
						Mikael Morin