public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30238]  New: associated(null-pointer, null-pointer) returns .true.
@ 2006-12-17 13:10 burnus at gcc dot gnu dot org
  2006-12-17 19:10 ` [Bug fortran/30238] " patchapp at dberlin dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2006-12-17 13:10 UTC (permalink / raw)
  To: gcc-bugs

For non-array calls, the "if" is directly created in
trans-intrinsic.c's gfc_conv_associated.

As one can see below, gfortran currently only checks whether two pointers are
the same, it also should check whether they are NULL pointers.

Example:
integer, pointer :: a
nullify(a)
if(associated(a,a)) call abort()
end

and dump:
  int4 * a;
  _gfortran_set_std (70, 127, 0);
  a = 0B;
  if (a == a)
    {
      _gfortran_abort ();
    }


-- 
           Summary: associated(null-pointer, null-pointer) returns .true.
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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


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

* [Bug fortran/30238] associated(null-pointer, null-pointer) returns .true.
  2006-12-17 13:10 [Bug fortran/30238] New: associated(null-pointer, null-pointer) returns .true burnus at gcc dot gnu dot org
@ 2006-12-17 19:10 ` patchapp at dberlin dot org
  2006-12-17 19:12 ` burnus at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: patchapp at dberlin dot org @ 2006-12-17 19:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from patchapp at dberlin dot org  2006-12-17 19:10 -------
Subject: Bug number PR30238

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01228.html


-- 


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


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

* [Bug fortran/30238] associated(null-pointer, null-pointer) returns .true.
  2006-12-17 13:10 [Bug fortran/30238] New: associated(null-pointer, null-pointer) returns .true burnus at gcc dot gnu dot org
  2006-12-17 19:10 ` [Bug fortran/30238] " patchapp at dberlin dot org
@ 2006-12-17 19:12 ` burnus at gcc dot gnu dot org
  2006-12-21 15:17 ` [Bug fortran/30238] [GCC 4.2 only] " burnus at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2006-12-17 19:12 UTC (permalink / raw)
  To: gcc-bugs



-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |burnus at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-12-17 19:11:53
               date|                            |


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


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

* [Bug fortran/30238] [GCC 4.2 only] associated(null-pointer, null-pointer) returns .true.
  2006-12-17 13:10 [Bug fortran/30238] New: associated(null-pointer, null-pointer) returns .true burnus at gcc dot gnu dot org
  2006-12-17 19:10 ` [Bug fortran/30238] " patchapp at dberlin dot org
  2006-12-17 19:12 ` burnus at gcc dot gnu dot org
@ 2006-12-21 15:17 ` burnus at gcc dot gnu dot org
  2007-01-02 12:48 ` burnus at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2006-12-21 15:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from burnus at gcc dot gnu dot org  2006-12-21 15:17 -------
http://gcc.gnu.org/ml/gcc-cvs/2006-12/msg00691.html


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|associated(null-pointer,    |[GCC 4.2 only]
                   |null-pointer) returns .true.|associated(null-pointer,
                   |                            |null-pointer) returns .true.


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


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

* [Bug fortran/30238] [GCC 4.2 only] associated(null-pointer, null-pointer) returns .true.
  2006-12-17 13:10 [Bug fortran/30238] New: associated(null-pointer, null-pointer) returns .true burnus at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-12-21 15:17 ` [Bug fortran/30238] [GCC 4.2 only] " burnus at gcc dot gnu dot org
@ 2007-01-02 12:48 ` burnus at gcc dot gnu dot org
  2007-01-02 12:49 ` [Bug fortran/30238] " burnus at gcc dot gnu dot org
  2007-01-10 19:02 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-01-02 12:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from burnus at gcc dot gnu dot org  2007-01-02 12:48 -------
Subject: Bug 30238

Author: burnus
Date: Tue Jan  2 12:48:14 2007
New Revision: 120338

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120338
Log:
fortran/
2007-01-02  Tobias Burnus  <burnus@net-b.de>

       PR fortran/30238
       * trans-intrinsic.c: Check for associated(NULL,NULL).

libgfortran/
2007-01-02  Tobias Burnus  <burnus@net-b.de>

       * intrinsics/associated.c: Check for associated(NULL,NULL).

testsuite/
2007-01-02  Tobias Burnus  <burnus@net-b.de>

       PR fortran/30238
       * gfortran.dg/associated_1.f90: Add test for associated(NULL,NULL).
       * gfortran.dg/associated_2.f90: Add test for associated(NULL,NULL).


Modified:
    branches/gcc-4_2-branch/gcc/fortran/ChangeLog
    branches/gcc-4_2-branch/gcc/fortran/trans-intrinsic.c
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/associated_1.f90
    branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/associated_2.f90
    branches/gcc-4_2-branch/libgfortran/ChangeLog
    branches/gcc-4_2-branch/libgfortran/intrinsics/associated.c


-- 


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


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

* [Bug fortran/30238] associated(null-pointer, null-pointer) returns .true.
  2006-12-17 13:10 [Bug fortran/30238] New: associated(null-pointer, null-pointer) returns .true burnus at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2007-01-02 12:48 ` burnus at gcc dot gnu dot org
@ 2007-01-02 12:49 ` burnus at gcc dot gnu dot org
  2007-01-10 19:02 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-01-02 12:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from burnus at gcc dot gnu dot org  2007-01-02 12:48 -------
Now also fixed in 4.2.


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
            Summary|[GCC 4.2 only]              |associated(null-pointer,
                   |associated(null-pointer,    |null-pointer) returns .true.
                   |null-pointer) returns .true.|


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


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

* [Bug fortran/30238] associated(null-pointer, null-pointer) returns .true.
  2006-12-17 13:10 [Bug fortran/30238] New: associated(null-pointer, null-pointer) returns .true burnus at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2007-01-02 12:49 ` [Bug fortran/30238] " burnus at gcc dot gnu dot org
@ 2007-01-10 19:02 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-01-10 19:02 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.2.0


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


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

end of thread, other threads:[~2007-01-10 19:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-17 13:10 [Bug fortran/30238] New: associated(null-pointer, null-pointer) returns .true burnus at gcc dot gnu dot org
2006-12-17 19:10 ` [Bug fortran/30238] " patchapp at dberlin dot org
2006-12-17 19:12 ` burnus at gcc dot gnu dot org
2006-12-21 15:17 ` [Bug fortran/30238] [GCC 4.2 only] " burnus at gcc dot gnu dot org
2007-01-02 12:48 ` burnus at gcc dot gnu dot org
2007-01-02 12:49 ` [Bug fortran/30238] " burnus at gcc dot gnu dot org
2007-01-10 19:02 ` pinskia 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).