Bug 61908 - load of invalid value for 'expr_t' in interface.c compare_actual_formal
Summary: load of invalid value for 'expr_t' in interface.c compare_actual_formal
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 7.0
: P3 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks: ubsan
  Show dependency treegraph
 
Reported: 2014-07-25 09:28 UTC by Vittorio Zecca
Modified: 2017-05-06 21:49 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2014-09-04 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vittorio Zecca 2014-07-25 09:28:57 UTC
Compiling the testsuite file unlimited_polymorphic_16 with sanitized gfortran
I get the following
"../../gcc-4.9.1/gcc/fortran/interface.c:2667:43: runtime error: 
load of value 1818451807, which is not a valid value for type 'expr_t'"
The offending line in interface.c:2667 is
"&& f->sym->ts.u.cl->length->expr_type == EXPR_CONSTANT"
in compare_actual_format.
Comment 1 Marek Polacek 2014-09-04 09:52:34 UTC
$ ./xgcc -B./ -c unlimited_polymorphic_16.f90 
/home/polacek/src/gcc/gcc/fortran/interface.c:2667:43: runtime error: load of value 1818451807, which is not a valid value for type 'expr_t'

Confirmed.
Comment 2 Jakub Jelinek 2014-10-30 10:39:21 UTC
GCC 4.9.2 has been released.
Comment 3 Vittorio Zecca 2015-04-24 17:01:10 UTC
I still have the same runtime error message in 4.9.2

Trying compilation of

!from unlimited_polymorphic_16.f90
!../../gcc-4.9.2/gcc/fortran/interface.c:2667:43: runtime error: load of value 1818451807, which is not a valid value for type 'expr_t'
contains
  subroutine FWRite(S)
    class(*) :: S
  end subroutine

  subroutine IO_OutputMargeStats()
    character tag
    call FWrite(tag)
  end subroutine

end

I get

./../gcc-4.9.2/gcc/fortran/interface.c:2667:43: runtime error: load of value 1818451807, which is not a valid value for type 'expr_t'
 MAIN__ __copy_character_1 io_outputmargestats fwrite main
Analyzing compilation unit
Performing interprocedural optimizations
 <*free_lang_data> <visibility> <early_local_cleanups> <*free_inline_summary> <whole-program> <inline>Assembling functions:
 __copy_character_1 MAIN__ main
Comment 4 Vittorio Zecca 2015-04-25 10:39:51 UTC
Stiil in 5.1.0 at interface.c:2701
Comment 5 Jakub Jelinek 2015-06-26 19:52:40 UTC
GCC 4.9.3 has been released.
Comment 6 Vittorio Zecca 2016-08-11 13:30:20 UTC
Still there in gcc 7.0 trunk 239276
Comment 7 Vittorio Zecca 2017-05-06 21:49:16 UTC
Fixed in 7.1.0