Bug 17849 - intrinsic_pack.f90
Summary: intrinsic_pack.f90
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Andrew Pinski
URL:
Keywords: ice-on-valid-code, patch
Depends on:
Blocks:
 
Reported: 2004-10-05 18:39 UTC by Tobias Schlüter
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Schlüter 2004-10-05 18:39:20 UTC
compiling intrinsic_pack.f90 fails with the following error:
[tobi@marktplatz libgfortran]$ ~/src/gcc/build-clean/gcc/f951
../gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_pack.f90
 MAIN__
 tests_with_temp

../gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_pack.f90: In
function 'MAIN__':
../gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_pack.f90:7: error:
address taken, but ADDRESSABLE bit not set
FRAME.117D.911

../gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_pack.f90:7: error:
address taken, but ADDRESSABLE bit not set
FRAME.117D.911

../gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_pack.f90:7: internal
compiler error: verify_stmts failed.
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

The bug disappears if the call to the contained function is not commented out.

Andrew Pinski has already posted a patch for this:
http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00404.html
Comment 1 Andrew Pinski 2004-10-05 18:40:18 UTC
Mine.
Comment 2 Andrew Pinski 2004-10-06 23:44:49 UTC
Fixed.
Comment 3 GCC Commits 2004-10-06 23:45:53 UTC
Subject: Bug 17849

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	pinskia@gcc.gnu.org	2004-10-06 23:45:48

Modified files:
	gcc/testsuite  : ChangeLog 
	gcc            : ChangeLog tree-nested.c 
Added files:
	gcc/testsuite/gfortran.fortran-torture/compile: nested.f90 

Log message:
	2004-10-06  Andrew Pinski  <pinskia@physics.uc.edu>
	
	PR middle-end/17849
	* gfortran.fortran-torture/compile/nested.f90: New test
	
	2004-10-06  Andrew Pinski  <pinskia@physics.uc.edu>
	
	PR middle-end/17849
	* tree-nested.c (walk_stmt_info): Add changed field.
	(convert_nonlocal_reference): Set changed to when we
	change a decl to unnested decl.
	<case ADDR_EXPR>: Instead of checking if the immediate part
	of the ADDR_EXPR changed, check the field changed.
	Use recompute_tree_invarant_for_addr_expr instead of unsetting
	TREE_INVARIANT.
	(convert_local_reference):  Set changed to when we
	change a decl to unnested decl.
	<case ADDR_EXPR>: Instead of checking if the immediate part
	of the ADDR_EXPR changed, check the field changed.
	Also call recompute_tree_invarant_for_addr_expr on the ADDR_EXPR.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4397&r2=1.4398
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5772&r2=2.5773
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-nested.c.diff?cvsroot=gcc&r1=2.19&r2=2.20
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.fortran-torture/compile/nested.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1