public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/57556] New: [OOP][Regression] ICE with move_alloc on polymorphic component
@ 2013-06-07 11:43 sfilippone at uniroma2 dot it
2013-06-07 11:55 ` [Bug fortran/57556] [4.9 Regression] [OOP] ICE with move_alloc on polymorphic component with -fcheck=all janus at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: sfilippone at uniroma2 dot it @ 2013-06-07 11:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57556
Bug ID: 57556
Summary: [OOP][Regression] ICE with move_alloc on polymorphic
component
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: sfilippone at uniroma2 dot it
Created attachment 30274
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30274&action=edit
Test case
The attached code generates the ICE when compiled with -fcheck=all. Looks very
similar but independent of PR57542, since the patch for the latter was already
applied. Works with 4.7/4.8.
------------------------------------------------
[sfilippo@jacobi BugDeallocateFinal]$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/gnu49/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc/configure --prefix=/usr/local/gnu49
--enable-languages=c,c++,fortran --with-gmp=/home/travel/GNUBUILD/gmp
--with-mpfr=/home/travel/GNUBUILD/mpfr --with-mpc=/home/travel/GNUBUILD/mpc
--with-cloog=/home/travel/GNUBUILD/cloog : (reconfigured) ../gcc/configure
--prefix=/usr/local/gnu49 --enable-languages=c,c++,fortran
--with-gmp=/home/travel/GNUBUILD/gmp --with-mpfr=/home/travel/GNUBUILD/mpfr
--with-mpc=/home/travel/GNUBUILD/mpc --with-cloog=/home/travel/GNUBUILD/cloog :
(reconfigured) ../gcc/configure --prefix=/usr/local/gnu49
--enable-languages=c,c++,fortran --with-gmp=/home/travel/GNUBUILD/gmp
--with-mpfr=/home/travel/GNUBUILD/mpfr --with-mpc=/home/travel/GNUBUILD/mpc
--with-cloog=/home/travel/GNUBUILD/cloog : (reconfigured) ../gcc/configure
--prefix=/usr/local/gnu49 --enable-languages=c,c++,fortran
--with-gmp=/home/travel/GNUBUILD/gmp --with-mpfr=/home/travel/GNUBUILD/mpfr
--with-mpc=/home/travel/GNUBUILD/mpc --with-cloog=/home/travel/GNUBUILD/cloog
Thread model: posix
gcc version 4.9.0 20130606 (experimental) (GCC)
[sfilippo@jacobi BugDeallocateFinal]$ gfortran -c testMoveAlloc.f90
[sfilippo@jacobi BugDeallocateFinal]$ gfortran -c -fcheck=all testMoveAlloc.f90
testMoveAlloc.f90: In function 'realloc_pool':
testMoveAlloc.f90:31:0: internal compiler error: tree check: did not expect
class 'type', have 'type' (boolean_type) in append_to_statement_list, at
tree-iterator.c:94
call move_alloc(pool(i)%item,dbp(i)%item)
^
0xb57be9 tree_not_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
../../gcc/gcc/tree.c:9159
0x9d9a0c non_type_check
../../gcc/gcc/tree.h:3869
0x9d9a0c append_to_statement_list(tree_node*, tree_node**)
../../gcc/gcc/tree-iterator.c:94
0x5b6f32 add_expr_to_chain
../../gcc/gcc/fortran/trans.c:1402
0x5b8ec6 gfc_add_block_to_block(stmtblock_t*, stmtblock_t*)
../../gcc/gcc/fortran/trans.c:1448
0x5b909b gfc_build_final_call
../../gcc/gcc/fortran/trans.c:898
0x5b909b gfc_add_finalizer_call(stmtblock_t*, gfc_expr*)
../../gcc/gcc/fortran/trans.c:1016
0x5b9aee gfc_deallocate_scalar_with_status(tree_node*, tree_node*, bool,
gfc_expr*, gfc_typespec)
../../gcc/gcc/fortran/trans.c:1300
0x6038ec conv_intrinsic_move_alloc
../../gcc/gcc/fortran/trans-intrinsic.c:7592
0x6038ec gfc_conv_intrinsic_subroutine(gfc_code*)
../../gcc/gcc/fortran/trans-intrinsic.c:7790
0x5b8bd2 trans_code
../../gcc/gcc/fortran/trans.c:1594
0x619544 gfc_trans_simple_do
../../gcc/gcc/fortran/trans-stmt.c:1425
0x619544 gfc_trans_do(gfc_code*, tree_node*)
../../gcc/gcc/fortran/trans-stmt.c:1588
0x5b8b0a trans_code
../../gcc/gcc/fortran/trans.c:1635
0x5e0cce gfc_generate_function_code(gfc_namespace*)
../../gcc/gcc/fortran/trans-decl.c:5460
0x5b9fd1 gfc_generate_module_code(gfc_namespace*)
../../gcc/gcc/fortran/trans.c:1859
0x578677 ../../gcc/gcc/fortran/parse.c:4496
0x578677 gfc_parse_file()
../../gcc/gcc/fortran/parse.c:4706
0x5b47f5 gfc_be_parse_file
../../gcc/gcc/fortran/f95-lang.c:189
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
[sfilippo@jacobi BugDeallocateFinal]$ translate_all_program_units
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/57556] [4.9 Regression] [OOP] ICE with move_alloc on polymorphic component with -fcheck=all
2013-06-07 11:43 [Bug fortran/57556] New: [OOP][Regression] ICE with move_alloc on polymorphic component sfilippone at uniroma2 dot it
@ 2013-06-07 11:55 ` janus at gcc dot gnu.org
2013-06-07 13:07 ` burnus at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: janus at gcc dot gnu.org @ 2013-06-07 11:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57556
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-06-07
CC| |janus at gcc dot gnu.org
Summary|[OOP][Regression] ICE with |[4.9 Regression] [OOP] ICE
|move_alloc on polymorphic |with move_alloc on
|component |polymorphic component with
| |-fcheck=all
Ever confirmed|0 |1
--- Comment #1 from janus at gcc dot gnu.org ---
Confirmed. Reduced test case:
type prec_type
end type
type container
class(prec_type), allocatable :: item
end type
type(container), allocatable :: pool(:), dbp(:)
allocate(dbp(1))
call move_alloc(pool(1)%item,dbp(1)%item)
end
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/57556] [4.9 Regression] [OOP] ICE with move_alloc on polymorphic component with -fcheck=all
2013-06-07 11:43 [Bug fortran/57556] New: [OOP][Regression] ICE with move_alloc on polymorphic component sfilippone at uniroma2 dot it
2013-06-07 11:55 ` [Bug fortran/57556] [4.9 Regression] [OOP] ICE with move_alloc on polymorphic component with -fcheck=all janus at gcc dot gnu.org
@ 2013-06-07 13:07 ` burnus at gcc dot gnu.org
2013-06-07 13:33 ` burnus at gcc dot gnu.org
2013-06-07 13:33 ` burnus at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-06-07 13:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57556
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.9.0
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Obvious patch for a stupid mistake of mine:
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -854,0 +855 @@ gfc_build_final_call (gfc_typespec ts, gfc_expr
+ gfc_start_block (&block);
@@ -939 +939,0 @@ gfc_build_final_call (gfc_typespec ts, gfc_expr
- gfc_start_block (&block);
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/57556] [4.9 Regression] [OOP] ICE with move_alloc on polymorphic component with -fcheck=all
2013-06-07 11:43 [Bug fortran/57556] New: [OOP][Regression] ICE with move_alloc on polymorphic component sfilippone at uniroma2 dot it
2013-06-07 11:55 ` [Bug fortran/57556] [4.9 Regression] [OOP] ICE with move_alloc on polymorphic component with -fcheck=all janus at gcc dot gnu.org
2013-06-07 13:07 ` burnus at gcc dot gnu.org
@ 2013-06-07 13:33 ` burnus at gcc dot gnu.org
2013-06-07 13:33 ` burnus at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-06-07 13:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57556
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> ---
FIXED.
Thanks for the report - and sorry for not properly solving PR57542.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/57556] [4.9 Regression] [OOP] ICE with move_alloc on polymorphic component with -fcheck=all
2013-06-07 11:43 [Bug fortran/57556] New: [OOP][Regression] ICE with move_alloc on polymorphic component sfilippone at uniroma2 dot it
` (2 preceding siblings ...)
2013-06-07 13:33 ` burnus at gcc dot gnu.org
@ 2013-06-07 13:33 ` burnus at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-06-07 13:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57556
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Author: burnus
Date: Fri Jun 7 13:20:29 2013
New Revision: 199812
URL: http://gcc.gnu.org/viewcvs?rev=199812&root=gcc&view=rev
Log:
2013-06-07 Tobias Burnus <burnus@net-b.de>
PR fortran/57556
* trans.c (gfc_build_final_call): Init block before use.
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans.c
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-06-07 13:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-07 11:43 [Bug fortran/57556] New: [OOP][Regression] ICE with move_alloc on polymorphic component sfilippone at uniroma2 dot it
2013-06-07 11:55 ` [Bug fortran/57556] [4.9 Regression] [OOP] ICE with move_alloc on polymorphic component with -fcheck=all janus at gcc dot gnu.org
2013-06-07 13:07 ` burnus at gcc dot gnu.org
2013-06-07 13:33 ` burnus at gcc dot gnu.org
2013-06-07 13:33 ` 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).