public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/35059]  New: Seg fault when max constructor limit reached
@ 2008-02-02 17:28 jvdelisle at gcc dot gnu dot org
  2008-02-02 17:37 ` [Bug fortran/35059] " jvdelisle at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-02-02 17:28 UTC (permalink / raw)
  To: gcc-bugs

The following gives a segmentation fault with N > 65535.  This is taken from
PR19925 Comment #10.  I have the fix for the segfault.

INTEGER, PARAMETER :: N=100000
INTEGER, PARAMETER :: I(N)=(/(MOD(K,2),K=1,N)/)
INTEGER, PARAMETER :: M(N)=I(N:1:-1)
END


-- 
           Summary: Seg fault when max constructor limit reached
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: jvdelisle at gcc dot gnu dot org
        ReportedBy: jvdelisle at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug fortran/35059] Seg fault when max constructor limit reached
  2008-02-02 17:28 [Bug fortran/35059] New: Seg fault when max constructor limit reached jvdelisle at gcc dot gnu dot org
@ 2008-02-02 17:37 ` jvdelisle at gcc dot gnu dot org
  2008-02-03 16:33 ` jvdelisle at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-02-02 17:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jvdelisle at gcc dot gnu dot org  2008-02-02 17:36 -------
Created an attachment (id=15080)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15080&action=view)
Proposed patch to fix some segfaults

This patch avoids the seg fault for the test case in this PR as well as the
invalid code given in PR34828 Comment #10.  I will submit this when 4.4 opens.


-- 


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug fortran/35059] Seg fault when max constructor limit reached
  2008-02-02 17:28 [Bug fortran/35059] New: Seg fault when max constructor limit reached jvdelisle at gcc dot gnu dot org
  2008-02-02 17:37 ` [Bug fortran/35059] " jvdelisle at gcc dot gnu dot org
@ 2008-02-03 16:33 ` jvdelisle at gcc dot gnu dot org
  2008-02-29 22:51 ` jvdelisle at gcc dot gnu dot org
  2008-03-12  1:11 ` jvdelisle at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-02-03 16:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jvdelisle at gcc dot gnu dot org  2008-02-03 16:32 -------
Just confirming this.


-- 

jvdelisle at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-02-03 16:32:52
               date|                            |


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug fortran/35059] Seg fault when max constructor limit reached
  2008-02-02 17:28 [Bug fortran/35059] New: Seg fault when max constructor limit reached jvdelisle at gcc dot gnu dot org
  2008-02-02 17:37 ` [Bug fortran/35059] " jvdelisle at gcc dot gnu dot org
  2008-02-03 16:33 ` jvdelisle at gcc dot gnu dot org
@ 2008-02-29 22:51 ` jvdelisle at gcc dot gnu dot org
  2008-03-12  1:11 ` jvdelisle at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-02-29 22:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jvdelisle at gcc dot gnu dot org  2008-02-29 22:51 -------
Subject: Bug 35059

Author: jvdelisle
Date: Fri Feb 29 22:50:25 2008
New Revision: 132782

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132782
Log:
2008-02-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR fortran/35059
        * expr.c (find_array_element): Modify traversing the constructor to
        avoid trying to access NULL memory pointed to by next for the
        last element. (find_array_section): Exit while loop if cons->next is
        NULL.
        * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
        (gfc_conv_function_call): Same.
        * decl.c (gfc_match_implicit): Same.
        * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.

Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/decl.c
    trunk/gcc/fortran/expr.c
    trunk/gcc/fortran/trans-expr.c
    trunk/gcc/fortran/trans-intrinsic.c


-- 


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug fortran/35059] Seg fault when max constructor limit reached
  2008-02-02 17:28 [Bug fortran/35059] New: Seg fault when max constructor limit reached jvdelisle at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2008-02-29 22:51 ` jvdelisle at gcc dot gnu dot org
@ 2008-03-12  1:11 ` jvdelisle at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-03-12  1:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jvdelisle at gcc dot gnu dot org  2008-03-12 01:11 -------
Fixed on 4.4 


-- 

jvdelisle at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.4.0


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-03-12  1:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-02 17:28 [Bug fortran/35059] New: Seg fault when max constructor limit reached jvdelisle at gcc dot gnu dot org
2008-02-02 17:37 ` [Bug fortran/35059] " jvdelisle at gcc dot gnu dot org
2008-02-03 16:33 ` jvdelisle at gcc dot gnu dot org
2008-02-29 22:51 ` jvdelisle at gcc dot gnu dot org
2008-03-12  1:11 ` jvdelisle at gcc dot gnu dot org

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).