This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/55990] New: Absent optional: gfortran.dg/class_optional_2.f90: Conditional jump depends on uninitialised value
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 15 Jan 2013 11:20:32 +0000
- Subject: [Bug fortran/55990] New: Absent optional: gfortran.dg/class_optional_2.f90: Conditional jump depends on uninitialised value
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55990
Bug #: 55990
Summary: Absent optional: gfortran.dg/class_optional_2.f90:
Conditional jump depends on uninitialised value
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: burnus@gcc.gnu.org
Note: gfortran.dg/class_optional_2.f90 has been added for PR 50981 / PR 54618.
It uses nullified pointers and absent optionals.
http://gcc.gnu.org/ml/gcc-testresults/2013-01/msg01524.html shows:
Running target unix/-m32 on x86_64-unknown-linux-gnu
FAIL: gfortran.dg/class_optional_2.f90 -O2 execution test
If one uses valgrind on the examples, one finds many failure of the form:
==15916== Conditional jump or move depends on uninitialised value(s)
==15916== at 0x41103BD: _gfortran_internal_pack (in_pack_generic.c:53)
which is called, respectively, in the lines:
==15916== by 0x80489A9: MAIN__ (class_optional_2.f90:39)
==15916== by 0x80489C5: MAIN__ (class_optional_2.f90:40)
Those contain the calls:
type(t), optional :: z(4) ! Absent actual argument
type(t), pointer :: y(:) ! nullified pointer
y => null()
...
call a4t(y) ! line 39
call a4t(z) ! line 40
Hereby, a4t is:
subroutine a4t(x)
type(t), intent(in), optional :: x(4)