gfortran does not recognice an empty array as 'present'

This commit is contained in:
Martin Diehl 2018-06-22 08:03:22 +02:00
parent c5ebe3510f
commit 1add0f3d84
3 changed files with 32 additions and 3 deletions

View File

@ -192,7 +192,7 @@ subroutine crystallite_init
myNcomponents, & !< number of components at current IP myNcomponents, & !< number of components at current IP
mySize mySize
character(len=64), dimension(:), allocatable :: str character(len=65536), dimension(:), allocatable :: str
character(len=65536) :: & character(len=65536) :: &
tag = '' tag = ''
@ -268,7 +268,13 @@ subroutine crystallite_init
do c = 1_pInt, material_Ncrystallite do c = 1_pInt, material_Ncrystallite
#if defined(__GFORTRAN__)
str = ['GfortranBug86277']
str = crystalliteConfig(c)%getStrings('(output)',defaultVal=str)
if (str(1) == 'GfortranBug86277') str = [character(len=65536)::]
#else
str = crystalliteConfig(c)%getStrings('(output)',defaultVal=[character(len=65536)::]) str = crystalliteConfig(c)%getStrings('(output)',defaultVal=[character(len=65536)::])
#endif
do o = 1_pInt, size(str) do o = 1_pInt, size(str)
crystallite_output(o,c) = str(o) crystallite_output(o,c) = str(o)
outputName: select case(str(o)) outputName: select case(str(o))

View File

@ -811,7 +811,13 @@ subroutine material_parsePhase
allocate(phase_stiffnessDegradation(maxval(phase_NstiffnessDegradations),material_Nphase), & allocate(phase_stiffnessDegradation(maxval(phase_NstiffnessDegradations),material_Nphase), &
source=STIFFNESS_DEGRADATION_undefined_ID) source=STIFFNESS_DEGRADATION_undefined_ID)
do p=1_pInt, material_Nphase do p=1_pInt, material_Nphase
#if defined(__GFORTRAN__)
str = ['GfortranBug86277']
str = phaseConfig(p)%getStrings('(source)',defaultVal=str)
if (str(1) == 'GfortranBug86277') str = [character(len=65536)::]
#else
str = phaseConfig(p)%getStrings('(source)',defaultVal=[character(len=65536)::]) str = phaseConfig(p)%getStrings('(source)',defaultVal=[character(len=65536)::])
#endif
do sourceCtr = 1_pInt, size(str) do sourceCtr = 1_pInt, size(str)
select case (trim(str(sourceCtr))) select case (trim(str(sourceCtr)))
case (SOURCE_thermal_dissipation_label) case (SOURCE_thermal_dissipation_label)
@ -835,7 +841,13 @@ subroutine material_parsePhase
end select end select
enddo enddo
#if defined(__GFORTRAN__)
str = ['GfortranBug86277']
str = phaseConfig(p)%getStrings('(kinematics)',defaultVal=str)
if (str(1) == 'GfortranBug86277') str = [character(len=65536)::]
#else
str = phaseConfig(p)%getStrings('(kinematics)',defaultVal=[character(len=65536)::]) str = phaseConfig(p)%getStrings('(kinematics)',defaultVal=[character(len=65536)::])
#endif
do kinematicsCtr = 1_pInt, size(str) do kinematicsCtr = 1_pInt, size(str)
select case (trim(str(kinematicsCtr))) select case (trim(str(kinematicsCtr)))
case (KINEMATICS_cleavage_opening_label) case (KINEMATICS_cleavage_opening_label)
@ -850,8 +862,13 @@ subroutine material_parsePhase
phase_kinematics(kinematicsCtr,p) = KINEMATICS_hydrogen_strain_ID phase_kinematics(kinematicsCtr,p) = KINEMATICS_hydrogen_strain_ID
end select end select
enddo enddo
#if defined(__GFORTRAN__)
str = ['GfortranBug86277']
str = phaseConfig(p)%getStrings('(stiffness_degradation)',defaultVal=str)
if (str(1) == 'GfortranBug86277') str = [character(len=65536)::]
#else
str = phaseConfig(p)%getStrings('(stiffness_degradation)',defaultVal=[character(len=65536)::]) str = phaseConfig(p)%getStrings('(stiffness_degradation)',defaultVal=[character(len=65536)::])
#endif
do stiffDegradationCtr = 1_pInt, size(str) do stiffDegradationCtr = 1_pInt, size(str)
select case (trim(str(stiffDegradationCtr))) select case (trim(str(stiffDegradationCtr)))
case (STIFFNESS_DEGRADATION_damage_label) case (STIFFNESS_DEGRADATION_damage_label)

View File

@ -162,7 +162,13 @@ use IO
prm%dilatation = phaseConfig(phase)%keyExists('/dilatation/') prm%dilatation = phaseConfig(phase)%keyExists('/dilatation/')
#if defined(__GFORTRAN__)
outputs = ['GfortranBug86277']
outputs = phaseConfig(phase)%getStrings('(output)',defaultVal=outputs)
if (outputs(1) == 'GfortranBug86277') outputs = [character(len=65536)::]
#else
outputs = phaseConfig(phase)%getStrings('(output)',defaultVal=[character(len=65536)::]) outputs = phaseConfig(phase)%getStrings('(output)',defaultVal=[character(len=65536)::])
#endif
allocate(prm%outputID(0)) allocate(prm%outputID(0))
do i=1_pInt, size(outputs) do i=1_pInt, size(outputs)
select case(outputs(i)) select case(outputs(i))