public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/102541] New: [12 Regression] runtime error: load of value 208393040, which is not a valid value for type 'ar_type' since r12-3897-g00f6de9c69119594f7dad3bd525937c94c8200d0
@ 2021-09-30 9:50 marxin at gcc dot gnu.org
2021-09-30 9:50 ` [Bug fortran/102541] " marxin at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-09-30 9:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102541
Bug ID: 102541
Summary: [12 Regression] runtime error: load of value
208393040, which is not a valid value for type
'ar_type' since
r12-3897-g00f6de9c69119594f7dad3bd525937c94c8200d0
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: marxin at gcc dot gnu.org
CC: burnus at gcc dot gnu.org
Blocks: 63426
Target Milestone: ---
The following is causing UBSAN:
$ cat ar.f90
type t
end type
class(T), allocatable :: ac(:)
call bar(ac)
contains
subroutine bar(x)
type(t) x(..)
end
end
$ /dev/shm/objdir2/gcc/xgcc -B /dev/shm/objdir2/gcc gcc/ar.f90 -c
/home/marxin/Programming/gcc2/gcc/fortran/trans-expr.c:6558:23: runtime error:
load of value 208393040, which is not a valid value for type 'ar_type'
#0 0x1127f3f in gfc_conv_procedure_call(gfc_se*, gfc_symbol*,
gfc_actual_arglist*, gfc_expr*, vec<tree_node*, va_gc, vl_embed>*)
/home/marxin/Programming/gcc2/gcc/fortran/trans-expr.c:6558
#1 0x1247a6c in gfc_trans_call(gfc_code*, bool, tree_node*, tree_node*,
bool) /home/marxin/Programming/gcc2/gcc/fortran/trans-stmt.c:425
#2 0xfe9298 in trans_code
/home/marxin/Programming/gcc2/gcc/fortran/trans.c:1986
#3 0xfe9a29 in gfc_trans_code(gfc_code*)
/home/marxin/Programming/gcc2/gcc/fortran/trans.c:2270
#4 0x10d2dbb in gfc_generate_function_code(gfc_namespace*)
/home/marxin/Programming/gcc2/gcc/fortran/trans-decl.c:6905
#5 0xfe9ac5 in gfc_generate_code(gfc_namespace*)
/home/marxin/Programming/gcc2/gcc/fortran/trans.c:2287
#6 0xdf8eca in translate_all_program_units
/home/marxin/Programming/gcc2/gcc/fortran/parse.c:6572
#7 0xdfa1e8 in gfc_parse_file()
/home/marxin/Programming/gcc2/gcc/fortran/parse.c:6841
#8 0xfa231c in gfc_be_parse_file
/home/marxin/Programming/gcc2/gcc/fortran/f95-lang.c:216
#9 0x2b0eb5a in compile_file /home/marxin/Programming/gcc2/gcc/toplev.c:458
#10 0x2b19eee in do_compile /home/marxin/Programming/gcc2/gcc/toplev.c:2233
#11 0x2b1a670 in toplev::main(int, char**)
/home/marxin/Programming/gcc2/gcc/toplev.c:2372
#12 0x7496c80 in main /home/marxin/Programming/gcc2/gcc/main.c:39
#13 0x7ffff6f1453f in __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
#14 0x7ffff6f145eb in __libc_start_main_impl ../csu/libc-start.c:409
#15 0xb03274 in _start (/dev/shm/objdir2/gcc/f951+0xb03274)
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63426
[Bug 63426] [meta-bug] Issues found with -fsanitize=undefined
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/102541] [12 Regression] runtime error: load of value 208393040, which is not a valid value for type 'ar_type' since r12-3897-g00f6de9c69119594f7dad3bd525937c94c8200d0
2021-09-30 9:50 [Bug fortran/102541] New: [12 Regression] runtime error: load of value 208393040, which is not a valid value for type 'ar_type' since r12-3897-g00f6de9c69119594f7dad3bd525937c94c8200d0 marxin at gcc dot gnu.org
@ 2021-09-30 9:50 ` marxin at gcc dot gnu.org
2021-10-12 7:56 ` cvs-commit at gcc dot gnu.org
2021-10-12 8:49 ` burnus at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-09-30 9:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102541
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Known to fail| |12.0
Status|UNCONFIRMED |NEW
Known to work| |11.2.0
Target Milestone|--- |12.0
Last reconfirmed| |2021-09-30
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/102541] [12 Regression] runtime error: load of value 208393040, which is not a valid value for type 'ar_type' since r12-3897-g00f6de9c69119594f7dad3bd525937c94c8200d0
2021-09-30 9:50 [Bug fortran/102541] New: [12 Regression] runtime error: load of value 208393040, which is not a valid value for type 'ar_type' since r12-3897-g00f6de9c69119594f7dad3bd525937c94c8200d0 marxin at gcc dot gnu.org
2021-09-30 9:50 ` [Bug fortran/102541] " marxin at gcc dot gnu.org
@ 2021-10-12 7:56 ` cvs-commit at gcc dot gnu.org
2021-10-12 8:49 ` burnus at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-12 7:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102541
--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tobias Burnus <burnus@gcc.gnu.org>:
https://gcc.gnu.org/g:eb92cd57a1ebe7cd7589bdbec34d9ae337752ead
commit r12-4346-geb92cd57a1ebe7cd7589bdbec34d9ae337752ead
Author: Tobias Burnus <tobias@codesourcery.com>
Date: Tue Oct 12 09:56:08 2021 +0200
Fortran: Various CLASS + assumed-rank fixed [PR102541]
Starting point was PR102541, were a previous patch caused an invalid
e->ref access for class. When testing, it turned out that for
CLASS to CLASS the code was never executed - additionally, issues
appeared for optional and a bogus error for -fcheck=all. In particular:
There were a bunch of issues related to optional CLASS, can have the
'attr.dummy' set in CLASS_DATA (sym) - but sometimes also in 'sym'!?!
Additionally, gfc_variable_attr could return pointer = 1 for nonpointers
when the expr is no longer "var" but "var%_data".
PR fortran/102541
gcc/fortran/ChangeLog:
* check.c (gfc_check_present): Handle optional CLASS.
* interface.c (gfc_compare_actual_formal): Likewise.
* trans-array.c (gfc_trans_g77_array): Likewise.
* trans-decl.c (gfc_build_dummy_array_decl): Likewise.
* trans-types.c (gfc_sym_type): Likewise.
* primary.c (gfc_variable_attr): Fixes for dummy and
pointer when 'class%_data' is passed.
* trans-expr.c (set_dtype_for_unallocated,
gfc_conv_procedure_call):
For assumed-rank dummy, fix setting rank for dealloc/notassoc
actual
and setting ubound to -1 for assumed-size actuals.
gcc/testsuite/ChangeLog:
* gfortran.dg/assumed_rank_24.f90: New test.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/102541] [12 Regression] runtime error: load of value 208393040, which is not a valid value for type 'ar_type' since r12-3897-g00f6de9c69119594f7dad3bd525937c94c8200d0
2021-09-30 9:50 [Bug fortran/102541] New: [12 Regression] runtime error: load of value 208393040, which is not a valid value for type 'ar_type' since r12-3897-g00f6de9c69119594f7dad3bd525937c94c8200d0 marxin at gcc dot gnu.org
2021-09-30 9:50 ` [Bug fortran/102541] " marxin at gcc dot gnu.org
2021-10-12 7:56 ` cvs-commit at gcc dot gnu.org
@ 2021-10-12 8:49 ` burnus at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-10-12 8:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102541
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
FIXED!
Thanks for the UBSAN run.
A follow-up PR102701 has been opened regarding some more CLASS corner cases
(unrelated to this PR / the original bug, but related to issues found when
fixing it.)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-12 8:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-30 9:50 [Bug fortran/102541] New: [12 Regression] runtime error: load of value 208393040, which is not a valid value for type 'ar_type' since r12-3897-g00f6de9c69119594f7dad3bd525937c94c8200d0 marxin at gcc dot gnu.org
2021-09-30 9:50 ` [Bug fortran/102541] " marxin at gcc dot gnu.org
2021-10-12 7:56 ` cvs-commit at gcc dot gnu.org
2021-10-12 8:49 ` burnus at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).