public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/55427] New: ICE class pointer
@ 2012-11-21 14:41 valeryweber at hotmail dot com
2012-11-21 16:53 ` [Bug fortran/55427] [OOP] ICE with class-array-pointer result janus at gcc dot gnu.org
2012-11-21 18:45 ` burnus at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: valeryweber at hotmail dot com @ 2012-11-21 14:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55427
Bug #: 55427
Summary: ICE class pointer
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: valeryweber@hotmail.com
Dear All
Is that known?
gcc version 4.8.0 20121121 (experimental) (GCC)
Valery
!>>>>>>>
MODULE base_types
IMPLICIT NONE
TYPE :: base_type
END TYPE base_type
TYPE, extends( base_type ) :: integer_type
integer :: i
END TYPE integer_type
contains
FUNCTION points_to ( this ) RESULT( reslt )
CLASS( base_type ), DIMENSION( : ), TARGET :: this
CLASS( base_type ), DIMENSION( : ), POINTER :: reslt
reslt => this
END FUNCTION points_to
END MODULE base_types
program bug
use base_types
implicit none
CLASS( base_type ), POINTER, DIMENSION( : ) :: reslt
CLASS( base_type ), ALLOCATABLE, DIMENSION( : ) :: val
type(integer_type) :: i
i%i=12345
ALLOCATE( val(10), source=i )
reslt => points_to ( val )
write(*,*) associated(reslt)
select type( p=> reslt )
type is(integer_type)
write(*,*) 'p=',p(2)%i
class default
stop 666
end select
end program bug
!=========
gfortran-trunk bug4.f90
bug4.f90: In function ‘bug’:
bug4.f90:24:0: internal compiler error: in fold_convert_loc, at
fold-const.c:1857
reslt => points_to ( val )
^
0x83cb322 fold_convert_loc(unsigned int, tree_node*, tree_node*)
../../gcc-trunk/gcc/fold-const.c:1856
0x81eff63 gfc_trans_pointer_assignment(gfc_expr*, gfc_expr*)
../../gcc-trunk/gcc/fortran/trans-expr.c:6350
0x81f34a5 gfc_trans_class_assign(gfc_expr*, gfc_expr*, gfc_exec_op)
../../gcc-trunk/gcc/fortran/trans-expr.c:888
0x81b1dda trans_code
../../gcc-trunk/gcc/fortran/trans.c:1322
0x81dcf17 gfc_generate_function_code(gfc_namespace*)
../../gcc-trunk/gcc/fortran/trans-decl.c:5349
0x816f1c5 translate_all_program_units
../../gcc-trunk/gcc/fortran/parse.c:4467
0x816f1c5 gfc_parse_file()
../../gcc-trunk/gcc/fortran/parse.c:4681
0x81acbca gfc_be_parse_file
../../gcc-trunk/gcc/fortran/f95-lang.c:191
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.
!<<<<<<<<<
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/55427] [OOP] ICE with class-array-pointer result
2012-11-21 14:41 [Bug fortran/55427] New: ICE class pointer valeryweber at hotmail dot com
@ 2012-11-21 16:53 ` janus at gcc dot gnu.org
2012-11-21 18:45 ` burnus at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: janus at gcc dot gnu.org @ 2012-11-21 16:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55427
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Keywords| |ice-on-valid-code
Last reconfirmed| |2012-11-21
CC| |janus at gcc dot gnu.org,
| |pault at gcc dot gnu.org
Ever Confirmed|0 |1
Summary|ICE class pointer |[OOP] ICE with
| |class-array-pointer result
--- Comment #1 from janus at gcc dot gnu.org 2012-11-21 16:52:56 UTC ---
(In reply to comment #0)
> Is that known?
Not that I know of. Reduced version:
MODULE base_types
IMPLICIT NONE
TYPE :: base_type
END TYPE
contains
FUNCTION points_to () RESULT (reslt)
CLASS(base_type), DIMENSION(:), POINTER :: reslt
END FUNCTION
END MODULE
program bug
use base_types
implicit none
CLASS(base_type), POINTER, DIMENSION(:) :: reslt
reslt => points_to()
end
ICEs with trunk and 4.7.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/55427] [OOP] ICE with class-array-pointer result
2012-11-21 14:41 [Bug fortran/55427] New: ICE class pointer valeryweber at hotmail dot com
2012-11-21 16:53 ` [Bug fortran/55427] [OOP] ICE with class-array-pointer result janus at gcc dot gnu.org
@ 2012-11-21 18:45 ` burnus at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-11-21 18:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55427
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-11-21 18:44:45 UTC ---
For trans-expr.c:6350 in gfc_trans_pointer_assignment:
6349 gfc_add_modify (&block, lse.expr,
6350 fold_convert (TREE_TYPE (lse.expr),
rse.expr));
TREE_TYPE(LHS) is:
<pointer_type 0x2aaaac29b1f8
type <record_type 0x2aaaac29b150 __vtype_base_types_Base_type BLK
And RHS is:
<call_expr 0x2aaaac1986c0
type <record_type 0x2aaaac29b930 __class_base_types_Base_type_1_0p type_4
BLK
size <integer_cst 0x2aaaac270e20 constant 448>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-21 18:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-21 14:41 [Bug fortran/55427] New: ICE class pointer valeryweber at hotmail dot com
2012-11-21 16:53 ` [Bug fortran/55427] [OOP] ICE with class-array-pointer result janus at gcc dot gnu.org
2012-11-21 18:45 ` 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).