* [Patch, Fortran] PR 51904 - with ICE with SIZE intrinsic
@ 2012-01-19 19:24 Tobias Burnus
2012-01-19 19:48 ` Steve Kargl
0 siblings, 1 reply; 2+ messages in thread
From: Tobias Burnus @ 2012-01-19 19:24 UTC (permalink / raw)
To: gcc patches, gfortran
[-- Attachment #1: Type: text/plain, Size: 187 bytes --]
Seemingly, resolve and friends are confused if there is no symtree -
thus set it.
Build and regtested on x86-64-linux.
OK for the trunk and the 4.6 branch? (It's a regression.)
Tobias
[-- Attachment #2: size-fix.diff --]
[-- Type: text/x-patch, Size: 1285 bytes --]
2012-01-19 Tobias Burnus <burnus@net-b.de>
PR fortran/51904
*expr.c (gfc_build_intrinsic_call): Also set the symtree.
2012-01-19 Tobias Burnus <burnus@net-b.de>
PR fortran/51904
* gfortran.dg/intrinsic_size_2.f90: New.
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index 8f04c73..7cea780 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -4519,6 +4519,11 @@ gfc_build_intrinsic_call (const char* name, locus where, unsigned numarg, ...)
result->value.function.name = name;
result->value.function.isym = isym;
+ result->symtree = gfc_find_symtree (gfc_current_ns->sym_root, name);
+ gcc_assert (result->symtree
+ && (result->symtree->n.sym->attr.flavor == FL_PROCEDURE
+ || result->symtree->n.sym->attr.flavor == FL_UNKNOWN));
+
va_start (ap, numarg);
atail = NULL;
for (i = 0; i < numarg; ++i)
--- /dev/null 2012-01-19 08:39:17.883655782 +0100
+++ gcc/gcc/testsuite/gfortran.dg/intrinsic_size_2.f90 2012-01-19 20:14:12.000000000 +0100
@@ -0,0 +1,17 @@
+! { dg-do compile }
+!
+! PR fortran/51904
+!
+! Contributed by David Sagan.
+!
+
+call qp_draw_polyline_basic([1.0,2.0])
+contains
+subroutine qp_draw_polyline_basic (x)
+ implicit none
+ real :: x(:), f
+ integer :: i
+ f = 0
+ print *, size(f*x)
+end subroutine
+end
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Patch, Fortran] PR 51904 - with ICE with SIZE intrinsic
2012-01-19 19:24 [Patch, Fortran] PR 51904 - with ICE with SIZE intrinsic Tobias Burnus
@ 2012-01-19 19:48 ` Steve Kargl
0 siblings, 0 replies; 2+ messages in thread
From: Steve Kargl @ 2012-01-19 19:48 UTC (permalink / raw)
To: Tobias Burnus; +Cc: gcc patches, gfortran
On Thu, Jan 19, 2012 at 08:23:58PM +0100, Tobias Burnus wrote:
> Seemingly, resolve and friends are confused if there is no symtree -
> thus set it.
>
> Build and regtested on x86-64-linux.
> OK for the trunk and the 4.6 branch? (It's a regression.)
>
Yes. Almost looks obvious (except I've read the audit
trail in the PR).
--
Steve
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-19 19:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-19 19:24 [Patch, Fortran] PR 51904 - with ICE with SIZE intrinsic Tobias Burnus
2012-01-19 19:48 ` Steve Kargl
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).