This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Regression with class_19.f03 in testsuite
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: fortran at gcc dot gnu dot org
- Date: Sat, 15 May 2010 12:24:15 -0700
- Subject: Re: Regression with class_19.f03 in testsuite
- References: <20100515183511.GA60754@troutmask.apl.washington.edu>
On Sat, May 15, 2010 at 11:35:11AM -0700, Steve Kargl wrote:
> Janus,
>
> Setting LD_LIBRARY_PATH to .:/usr/home/kargl/gcc/obj4x/i386-unknown-freebsd9.0/./libgfortran/.libs:/usr/home/kargl/gcc/obj4x/i386-unknown-freebsd9.0/./libgfortran/.libs:/usr/home/kargl/gcc/obj4x/gcc:.:/usr/home/kargl/gcc/obj4x/i386-unknown-freebsd9.0/./libgfortran/.libs:/usr/home/kargl/gcc/obj4x/i386-unknown-freebsd9.0/./libgfortran/.libs:/usr/home/kargl/gcc/obj4x/gcc
> At line 25 of file /usr/home/kargl/gcc/gcc4x/gcc/testsuite/gfortran.dg/class_19.f03
> Fortran runtime error: Attempting to allocate already allocated variable 'try2'
> FAIL: gfortran.dg/class_19.f03 -O0 execution test
>
>
Note, it only fails with -O0.
laptop:kargl[229] gfc4x -o z -O0 -fdump-tree-original class_19.f03
laptop:kargl[230] ./z
At line 25 of file class_19.f03
Fortran runtime error: Attempting to allocate already allocated variable 'try2'
-fdump-tree-original follows my sig.
--
Steve
foo_checkit ()
{
struct foo_outer try;
struct foo_outer * try2;
struct class$foo_outer_a try3;
try.int.$data = 0B;
try3.$data = 0B;
if (try.int.$data != 0B)
{
_gfortran_abort ();
}
{
struct foo_outer * D.1532;
if (try3.$data == 0B)
{
{
void * restrict D.1533;
D.1533 = (void * restrict) __builtin_malloc (8);
if (D.1533 == 0B)
{
_gfortran_os_error (&"Out of memory"[1]{lb: 1 sz: 1});
}
D.1532 = (struct foo_outer *) D.1533;
}
}
else
{
_gfortran_runtime_error_at (&"At line 23 of file class_19.f03"[1]{lb: 1 sz: 1}, &"Attempting to allocate already allocated variable \'%s\'"[1]{lb: 1 sz: 1}, &"try3"[1]{lb: 1 sz: 1});
}
try3.$data = D.1532;
try3.$data->int.$data = 0B;
}
try3.$vptr = &vtab$foo_outer;
if (try3.$data->int.$data != 0B)
{
_gfortran_abort ();
}
{
struct foo_outer * D.1534;
if (try2 == 0B)
{
{
void * restrict D.1535;
D.1535 = (void * restrict) __builtin_malloc (8);
if (D.1535 == 0B)
{
_gfortran_os_error (&"Out of memory"[1]{lb: 1 sz: 1});
}
D.1534 = (struct foo_outer *) D.1535;
}
}
else
{
_gfortran_runtime_error_at (&"At line 25 of file class_19.f03"[1]{lb: 1 sz: 1}, &"Attempting to allocate already allocated variable \'%s\'"[1]{lb: 1 sz: 1}, &"try2"[1]{lb: 1 sz: 1});
}
try2 = D.1534;
try2->int.$data = 0B;
}
if (try2->int.$data != 0B)
{
_gfortran_abort ();
}
if (try3.$data != 0B)
{
__builtin_free ((void *) try3.$data);
}
if (try2->int.$data != 0B)
{
__builtin_free ((void *) try2->int.$data);
}
try2->int.$data = 0B;
if (try.int.$data != 0B)
{
__builtin_free ((void *) try.int.$data);
}
try.int.$data = 0B;
}
MAIN__ ()
{
foo_checkit ();
}
main (integer(kind=4) argc, character(kind=1) * * argv)
{
static integer(kind=4) options.0[8] = {68, 255, 0, 0, 0, 1, 0, 1};
_gfortran_set_args (argc, argv);
_gfortran_set_options (8, &options.0[0]);
MAIN__ ();
return 0;
}