[Bug fortran/31218] ICE on valid code with gfortran

2007-06-14 Thread pault at gcc dot gnu dot org


--- Comment #7 from pault at gcc dot gnu dot org  2007-06-14 12:13 ---
As reported in comment#6, this cleared itself.

Paul


-- 

pault at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31218



[Bug fortran/31218] ICE on valid code with gfortran

2007-05-30 Thread pault at gcc dot gnu dot org


--- Comment #6 from pault at gcc dot gnu dot org  2007-05-30 13:23 ---
This seems to have fixed itself - all three testcases run fine on  4.3.0
20070525.  I'll check it out tonight on x86_ia64 and, if all is well, I'll
clear the PR.

Paul


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31218



[Bug fortran/31218] ICE on valid code with gfortran

2007-05-04 Thread fxcoudert at gcc dot gnu dot org


--- Comment #5 from fxcoudert at gcc dot gnu dot org  2007-05-04 12:31 
---
RESHAPE is not simplified, because "x" has type EXPR_CONSTANT (scalar constant)
which is not accepted by the simplification routine gfc_simplify_reshape,
because it wants arguments to be EXPR_ARRAY (ie array constructor). Thus, the
following code fails to compile:
  integer, parameter :: x(1) = 1, y(1) = reshape(x,(/1/))
  print *, y
  end
while that other one works fine:
  integer, parameter :: x(1) = (/1/), y(1) = reshape(x,(/1/))
  print *, y
  end

I don't know if it's OK for x to have type EXPR_CONSTANT, but I think it is. In
that case, gfc_simplify_reshape should be modified to account for this
possibility.


-- 

fxcoudert at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||fxcoudert at gcc dot gnu dot
   ||org
   Last reconfirmed|2007-03-17 15:42:32 |2007-05-04 12:31:41
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31218



[Bug fortran/31218] ICE on valid code with gfortran

2007-05-03 Thread jvdelisle at gcc dot gnu dot org


--- Comment #4 from jvdelisle at gcc dot gnu dot org  2007-05-04 02:47 
---
The ice is happening here:

/* Create an array constructor from an initialization expression.
   We assume the frontend already did any expansions and conversions.  */

tree
gfc_conv_array_initializer (tree type, gfc_expr * expr)
{
  gfc_constructor *c;
  tree tmp;
  mpz_t maxval;
  gfc_se se;
  HOST_WIDE_INT hi;
  unsigned HOST_WIDE_INT lo;
  tree index, range;
  VEC(constructor_elt,gc) *v = NULL;
gfc_show_expr (expr);
  switch (expr->expr_type)
{
case EXPR_CONSTANT:
case EXPR_STRUCTURE:

The comment indicates that the initialization expression should already be
expanded.  For the test case given, expr->expr_type is FUNCTION for which there
is no case.  The function needs to be evaluated before getting here.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31218



[Bug fortran/31218] ICE on valid code with gfortran

2007-04-16 Thread tobi at gcc dot gnu dot org


--- Comment #3 from tobi at gcc dot gnu dot org  2007-04-16 14:14 ---
Reduced testcase:
 real, dimension(1), parameter :: r=1.0
 real, dimension(1) :: s=RESHAPE(r,(/1/))

 IF (ANY(s.NE.1.0)) CALL ABORT()
 END


-- 

tobi at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||tobi at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31218



[Bug fortran/31218] ICE on valid code with gfortran

2007-04-06 Thread brooks at gcc dot gnu dot org


--- Comment #2 from brooks at gcc dot gnu dot org  2007-04-06 23:06 ---
The following code repeats the ICE:

 character(LEN=2), parameter :: a="a "
 real, dimension(2,2), parameter :: r=1.0
 character(LEN=4) :: b=REPEAT(a,2)
 real, dimension(4) :: l=RESHAPE(r,(/4/))
 character(LEN=3) :: c=TRIM("a ")

 IF (b.NE."a a ") CALL ABORT()
 IF (ANY(l.NE.1.0)) CALL ABORT()
 IF (c.NE."a  ") CALL ABORT()
 END

This is thus not something coming from the lack of transfer constant-folding.


-- 

brooks at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||brooks at gcc dot gnu dot
   ||org
OtherBugsDependingO|31237   |
  nThis||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31218



[Bug fortran/31218] ICE on valid code with gfortran

2007-03-17 Thread tkoenig at gcc dot gnu dot org


--- Comment #1 from tkoenig at gcc dot gnu dot org  2007-03-17 15:42 ---
Confirmed.


-- 

tkoenig at gcc dot gnu dot org changed:

   What|Removed |Added

OtherBugsDependingO||31237
  nThis||
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2007-03-17 15:42:32
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31218