User account creation filtered due to spam.

Bug 51943 - [OOP] ICE in conv_function_val
Summary: [OOP] ICE in conv_function_val
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-22 16:28 UTC by Dominique Pelletier
Modified: 2012-01-27 10:11 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
bug occurs when compiling file interable_model.module.f03 (1.32 KB, application/octet-stream)
2012-01-22 16:39 UTC, Dominique Pelletier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dominique Pelletier 2012-01-22 16:28:32 UTC

    
Comment 1 Dominique Pelletier 2012-01-22 16:39:36 UTC
Created attachment 26411 [details]
bug occurs when compiling file interable_model.module.f03

I got this file form Damian Rouson's bool
scientific software the object oriented way

I compile with gfortran 4.7.1 build 2012.01.19

i compile file integrable_model_module.f03

with teh following command

gfortran -c integrable_model_module
Comment 2 kargl 2012-01-22 17:16:42 UTC
How is one suppose to compile this code?

module integrable_model_module
  use global_parameters_module ,only : debugging ! print call tree information if true
Comment 3 Tobias Burnus 2012-01-22 17:54:11 UTC
I think this issue is a duplicate of PR 51870 - and of PR 48705. At least the program works with a draft patch for those PRs.

Note that I had to comment the USE statement in the example and replace it by a "logical :: debugging" line.
Comment 4 Paul Thomas 2012-01-27 10:06:05 UTC
Author: pault
Date: Fri Jan 27 10:05:56 2012
New Revision: 183613

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183613
Log:
2012-01-27  Paul Thomas  <pault@gcc.gnu.org>
	    Tobias Burnus <burnus@gcc.gnu.org>

	PR fortran/48705
	PR fortran/51870
	PR fortran/51943
	PR fortran/51946
	* trans-array.c (gfc_array_init_size): Add two extra arguments
	to convey the dynamic element size of a calls object and to
	return the number of elements that have been allocated.
	(gfc_array_allocate): Add the same arguments and use them to
	call gfc_array_init_size.  Before the allocation dereference
	the data pointer, if necessary. Set the allocated array to zero
	if the class element size or expr3 are non-null.
	* trans-expr.c (gfc_conv_class_to_class): Give this function
	global scope.
	(get_class_array_ref): New function.
	(gfc_copy_class_to_class): New function.
	* trans-array.h : Update prototype for gfc_array_allocate.
	* trans-stmt.c (gfc_trans_allocate): For non-variable class
	STATUS expressions extract the class object and the dynamic
	element size. Use the latter to call gfc_array_allocate and
	the former for setting the vptr and, via
	gfc_copy_class_to_clasfc_cs, to copy to the allocated data.
	* trans.h : Prototypes for gfc_get_class_array_ref,
	gfc_copy_class_to_class and gfc_conv_class_to_class.
  

2012-01-27  Paul Thomas  <pault@gcc.gnu.org>
	    Tobias Burnus <burnus@gcc.gnu.org>

	PR fortran/48705
	* gfortran.dg/class_allocate_11.f03: New.

	PR fortran/51870
	PR fortran/51943
	PR fortran/51946
	* gfortran.dg/class_allocate_7.f03: New.
	* gfortran.dg/class_allocate_8.f03: New.
	* gfortran.dg/class_allocate_9.f03: New.
	* gfortran.dg/class_allocate_10.f03: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/class_allocate_10.f03
    trunk/gcc/testsuite/gfortran.dg/class_allocate_11.f03
    trunk/gcc/testsuite/gfortran.dg/class_allocate_7.f03
    trunk/gcc/testsuite/gfortran.dg/class_allocate_8.f03
    trunk/gcc/testsuite/gfortran.dg/class_allocate_9.f03
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-array.c
    trunk/gcc/fortran/trans-array.h
    trunk/gcc/fortran/trans-expr.c
    trunk/gcc/fortran/trans-stmt.c
    trunk/gcc/fortran/trans.h
    trunk/gcc/testsuite/ChangeLog
Comment 5 Paul Thomas 2012-01-27 10:11:42 UTC
Fixed on trunk

Thanks for the report

Paul