public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "kargl at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/34828] ICE: GNU MP: Cannot reallocate memory for gfortran.dg/parameter_array_init_3.f90
Date: Wed, 30 Apr 2008 22:37:00 -0000	[thread overview]
Message-ID: <20080430223711.13999.qmail@sourceware.org> (raw)
In-Reply-To: <bug-34828-13404@http.gcc.gnu.org/bugzilla/>



------- Comment #16 from kargl at gcc dot gnu dot org  2008-04-30 22:37 -------
(In reply to comment #15)
> Un-assigning myself. I can see valgrind errors but have been unable to isolate
> the problem.
> 

I may have a further piece to the puzzle.  It appears that len(HEX1) is not
being properly evaluated to give MSKa1(len(HEX1)) the correct array descriptor.
 A modified program shows

program z
  call a
  call b
  call d
end program z

subroutine a
   implicit none
   integer i
   character(8), parameter :: HEX1 = '40490FDB'
   integer, parameter :: MSKa1(len(HEX1)) =  [(1,i=1,len(HEX1))]
!
! If uncomment either line, then segfault.
!
!   integer, parameter :: ARR1(len(HEX1)) = [( MSKa1(i), i=1,len(HEX1) )]
!   integer, parameter :: ARR1(8) = [( MSKa1(i), i=1,len(HEX1) )]

   print '(A,1x,8(i0,1x))', hex1, mska1
end subroutine a

subroutine b
   implicit none
   integer i
   character(8), parameter :: HEX1 = '40490FDB'
!
! If 8 in MSKa1(8) is len(HEX1), then segfault.
!
   integer, parameter :: MSKa1(8) =  [(1,i=1,len(HEX1))]
   integer, parameter :: ARR1(len(HEX1)) = [( MSKa1(i), i=1,len(HEX1) )]
   print '(A,1x,16(i0,1x))', hex1, mska1, arr1
end subroutine b
!
! This works as expected!
!
subroutine d
   implicit none
   integer i
   character(8), parameter :: HEX1 = '40490FDB'
   integer, parameter :: MSKa1(8) =  [(1,i=1,len(HEX1))]
   integer, parameter :: ARR1(8) = [( MSKa1(i), i=1,len(HEX1) )]
   print '(A,1x,16(i0,1x))', hex1, mska1, arr1
end subroutine d


-- 


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


  parent reply	other threads:[~2008-04-30 22:37 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-17 16:15 [Bug fortran/34828] New: " burnus at gcc dot gnu dot org
2008-01-18  6:12 ` [Bug fortran/34828] " jvdelisle at gcc dot gnu dot org
2008-01-18  7:13 ` kargl at gcc dot gnu dot org
2008-01-18 23:33 ` jvdelisle at gcc dot gnu dot org
2008-01-20  3:41 ` kargl at gcc dot gnu dot org
2008-01-25 23:31 ` danglin at gcc dot gnu dot org
2008-01-28  9:10 ` jvdelisle at gcc dot gnu dot org
2008-01-28  9:17 ` jvdelisle at gcc dot gnu dot org
2008-01-28  9:21 ` jvdelisle at gcc dot gnu dot org
2008-01-28  9:53 ` dominiq at lps dot ens dot fr
2008-01-29  5:18 ` jvdelisle at gcc dot gnu dot org
2008-01-29  5:53 ` jvdelisle at gcc dot gnu dot org
2008-01-30  6:57 ` jvdelisle at gcc dot gnu dot org
2008-01-30 15:55 ` dominiq at lps dot ens dot fr
2008-01-30 18:29 ` Jerry_V_DeLisle at rl dot gov
2008-03-25  2:53 ` jvdelisle at gcc dot gnu dot org
2008-04-30 22:37 ` kargl at gcc dot gnu dot org [this message]
2008-05-26 17:05 ` jvdelisle at gcc dot gnu dot org
2008-05-28 17:27 ` fxcoudert at gcc dot gnu dot org
2008-08-08 20:54 ` jv244 at cam dot ac dot uk
2008-08-08 21:08 ` dave at hiauly1 dot hia dot nrc dot ca
2008-08-09  5:17 ` kargl at gcc dot gnu dot org
2008-08-11  7:36 ` jv244 at cam dot ac dot uk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080430223711.13999.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).