From: Jerry DeLisle Date: Fri, 13 Aug 2010 05:14:18 +0000 (+0000) Subject: re PR fortran/42526 (bogus truncation warning for default-initialized character compo... X-Git-Tag: releases/gcc-4.6.0~5019 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf677bb86756a4ab60f1db9592261cfa90265b17;p=thirdparty%2Fgcc.git re PR fortran/42526 (bogus truncation warning for default-initialized character components) 2010-08-12 Jerry DeLisle PR libfortran/42526 * gfortran.dg/char_component_initializer_1.f90: New test. From-SVN: r163220 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e0a2b96e6dc4..04670c0b148a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-08-12 Jerry DeLisle + + PR libfortran/42526 + * gfortran.dg/char_component_initializer_1.f90: New test. + 2010-08-12 Changpeng Fang PR tree-optimization/45241 diff --git a/gcc/testsuite/gfortran.dg/char_component_initializer_2.f90 b/gcc/testsuite/gfortran.dg/char_component_initializer_2.f90 new file mode 100644 index 000000000000..e57fc8659123 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/char_component_initializer_2.f90 @@ -0,0 +1,16 @@ +! { dg-do run } +! { dg-options "-Wall" } +! Added -Wall option to make sure PR42526 does not show up again. +program gfcbug62 + implicit none + character(len=16) :: tdefi(2) = (/'0z1jan0000','1hr '/) + type t_ctl + character(len=16) :: tdefi(2) = (/'0z1jan0000','1hr '/) + end type t_ctl + + type(t_ctl) :: ctl + integer :: i,k + i = 1 + k = 1 + if (tdefi(1) .ne. ctl%tdefi(1)) call abort () +end program gfcbug62