public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/33317]  New: CSHIFT: Crash if variable passed to DIM= is not present
@ 2007-09-05 20:59 burnus at gcc dot gnu dot org
  2007-09-05 21:04 ` [Bug fortran/33317] CSHIFT/EOSHIFT: " burnus at gcc dot gnu dot org
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-09-05 20:59 UTC (permalink / raw)
  To: gcc-bugs

The following program should print twice "T T T T" as if DIM is not present, 1
is assumed.

The standard does not forbid to pass a variable which has the OPTIONAL
attribute to CSHIFT. NAG f95 and ifort print as expected twice "T T T T".

gfortran simply crashes.

program test
 implicit none
 call sub(1)
 call sub()
contains
 subroutine sub(d)
   integer, optional :: d
   print *, cshift([.true.,.true.,.true.,.true.],1,d)
 end subroutine
end program test


-- 
           Summary: CSHIFT: Crash if variable passed to DIM= is not present
           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=33317


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

* [Bug fortran/33317] CSHIFT/EOSHIFT: Crash if variable passed to DIM= is not present
  2007-09-05 20:59 [Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present burnus at gcc dot gnu dot org
@ 2007-09-05 21:04 ` burnus at gcc dot gnu dot org
  2007-09-05 21:20 ` [Bug fortran/33317] CSHIFT/EOSHIFT: Rejects optional dummy for DIM= burnus at gcc dot gnu dot org
                   ` (20 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-09-05 21:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from burnus at gcc dot gnu dot org  2007-09-05 21:04 -------
Same for EOSHIFT, example (replace in above's program)

   print *, eoshift([.true.,.true.,.true.,.true.],1,dim=d)

ifort and NAG f95 print twice "T T T F".


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|CSHIFT: Crash if variable   |CSHIFT/EOSHIFT: Crash if
                   |passed to DIM= is not       |variable passed to DIM= is
                   |present                     |not present


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


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

* [Bug fortran/33317] CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
  2007-09-05 20:59 [Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present burnus at gcc dot gnu dot org
  2007-09-05 21:04 ` [Bug fortran/33317] CSHIFT/EOSHIFT: " burnus at gcc dot gnu dot org
@ 2007-09-05 21:20 ` burnus at gcc dot gnu dot org
  2007-10-25  9:00 ` jv244 at cam dot ac dot uk
                   ` (19 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-09-05 21:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from burnus at gcc dot gnu dot org  2007-09-05 21:20 -------
Correction: gfortran rejects this currently and does not accept it and crash;
better than crashing but still wrong.
(I modified check.c's dim_check and enabled it accidentally.)


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|wrong-code                  |rejects-valid
            Summary|CSHIFT/EOSHIFT: Crash if    |CSHIFT/EOSHIFT: Rejects
                   |variable passed to DIM= is  |optional dummy for DIM=
                   |not present                 |


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


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

* [Bug fortran/33317] CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
  2007-09-05 20:59 [Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present burnus at gcc dot gnu dot org
  2007-09-05 21:04 ` [Bug fortran/33317] CSHIFT/EOSHIFT: " burnus at gcc dot gnu dot org
  2007-09-05 21:20 ` [Bug fortran/33317] CSHIFT/EOSHIFT: Rejects optional dummy for DIM= burnus at gcc dot gnu dot org
@ 2007-10-25  9:00 ` jv244 at cam dot ac dot uk
  2007-10-25  9:39 ` dominiq at lps dot ens dot fr
                   ` (18 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jv244 at cam dot ac dot uk @ 2007-10-25  9:00 UTC (permalink / raw)
  To: gcc-bugs



-- 

jv244 at cam dot ac dot uk changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-10-25 09:00:05
               date|                            |


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


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

* [Bug fortran/33317] CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
  2007-09-05 20:59 [Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present burnus at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2007-10-25  9:00 ` jv244 at cam dot ac dot uk
@ 2007-10-25  9:39 ` dominiq at lps dot ens dot fr
  2007-11-14  5:20 ` jvdelisle at gcc dot gnu dot org
                   ` (17 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: dominiq at lps dot ens dot fr @ 2007-10-25  9:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from dominiq at lps dot ens dot fr  2007-10-25 09:39 -------
On Darwin with revision 129623, the orginal code gives:

pr33317.f90:8.51:

   print *, cshift([.true.,.true.,.true.,.true.],1,d)
                                                  1
Error: 'dim' argument of 'cshift' intrinsic at (1) must not be OPTIONAL

while

program test
 implicit none
 call sub(1)
 call sub()
contains
 subroutine sub(d)
   integer, optional :: d
   if (present(d)) then
      print *, eoshift((/.true.,.true.,.true.,.true./),1,d)
   else
      print *, eoshift((/.true.,.true.,.true.,.true./),1)
   end if
 end subroutine
end program test

ICE with:

pr33317_db_1.f90:9.61:

      print *, eoshift((/.true.,.true.,.true.,.true./),1,dim=d)
                                                            1
pr33317_db_1.f90:0: internal compiler error: Bus error


-- 


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


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

* [Bug fortran/33317] CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
  2007-09-05 20:59 [Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present burnus at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2007-10-25  9:39 ` dominiq at lps dot ens dot fr
@ 2007-11-14  5:20 ` jvdelisle at gcc dot gnu dot org
  2007-11-16  6:23 ` jvdelisle at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-11-14  5:20 UTC (permalink / raw)
  To: gcc-bugs



-- 

jvdelisle at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jvdelisle at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-10-25 09:00:05         |2007-11-14 05:20:33
               date|                            |


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


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

* [Bug fortran/33317] CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
  2007-09-05 20:59 [Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present burnus at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2007-11-14  5:20 ` jvdelisle at gcc dot gnu dot org
@ 2007-11-16  6:23 ` jvdelisle at gcc dot gnu dot org
  2007-11-17 18:22 ` jvdelisle at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-11-16  6:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jvdelisle at gcc dot gnu dot org  2007-11-16 06:23 -------
program test
 implicit none
 call sub(1)
 call sub()
contains
 subroutine sub(dimmy)
   integer, optional :: dimmy
   logical :: lotto(4)
   lotto = .false.
   lotto = cshift((/.true.,.true.,.true.,.true./),1,dimmy)
   print *, lotto
 end subroutine
end program test

After enabling the optional argument with -m32 -fdump-tree-original we get:

sub (dimmy)
{
  logical4 lotto[4];

  (void) __builtin_memset ((void *) &lotto, 0, 16);
  {
    int4 * D.515;
    static int4 C.514 = 1;
    struct array1_logical4 parm.2;
    static logical4 A.1[4] = {1, 1, 1, 1};
    struct array1_logical4 parm.0;

    parm.0.dtype = 273;
    parm.0.dim[0].lbound = 1;
    parm.0.dim[0].ubound = 4;
    parm.0.dim[0].stride = 1;
    parm.0.data = (void *) &lotto[0];
    parm.0.offset = -1;
    parm.2.dtype = 273;
    parm.2.dim[0].lbound = 1;
    parm.2.dim[0].ubound = 4;
    parm.2.dim[0].stride = 1;
    parm.2.data = (void *) &A.1[0];
    parm.2.offset = 0;
    D.515 = dimmy != 0B ? dimmy : 0B;
    _gfortran_cshift0_4 (&parm.0, &parm.2, &C.514, D.515);
  }
 and it works as expected.

With -m64 it obviously fails with the following:

sub (dimmy)
{
  logical4 lotto[4];

  (void) __builtin_memset ((void *) &lotto, 0, 16);
  {
    int4 D.874;
    static int4 C.873 = 1;
    struct array1_logical4 parm.2;
    static logical4 A.1[4] = {1, 1, 1, 1};
    struct array1_logical4 parm.0;

    parm.0.dtype = 273;
    parm.0.dim[0].lbound = 1;
    parm.0.dim[0].ubound = 4;
    parm.0.dim[0].stride = 1;
    parm.0.data = (void *) &lotto[0];
    parm.0.offset = -1;
    parm.2.dtype = 273;
    parm.2.dim[0].lbound = 1;
    parm.2.dim[0].ubound = 4;
    parm.2.dim[0].stride = 1;
    parm.2.data = (void *) &A.1[0];
    parm.2.offset = 0;
    D.874 = *dimmy;
    _gfortran_cshift0_4 (&parm.0, &parm.2, &C.873, &D.874);
  }


-- 


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


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

* [Bug fortran/33317] CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
  2007-09-05 20:59 [Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present burnus at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2007-11-16  6:23 ` jvdelisle at gcc dot gnu dot org
@ 2007-11-17 18:22 ` jvdelisle at gcc dot gnu dot org
  2007-11-18 21:00 ` jvdelisle at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-11-17 18:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jvdelisle at gcc dot gnu dot org  2007-11-17 18:22 -------
The problem here is that when we resolve cshift and eoshift we convert dim from
a EXPR_VARIABLE to a EXPR_FUNCTION that converts the type to match up with the
runtime function.

Later in trans-expr.c, code is not built to test for NULL and set dim to the
default of 1 since dim is no longer a variable and there is nothing in
gfc_conv_function_call to handle it.  It is normally handled by
gfc_conv_missing_dummy.

Further complicating this, the conversion of type function, such as
convert_i8_i4 which gets simplified to a cast segfaults when dim is NULL.

I think the solution is to build the type conversion later in
gfc_conv_missing_dummy after building the test for NULL.


-- 


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


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

* [Bug fortran/33317] CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
  2007-09-05 20:59 [Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present burnus at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2007-11-17 18:22 ` jvdelisle at gcc dot gnu dot org
@ 2007-11-18 21:00 ` jvdelisle at gcc dot gnu dot org
  2007-11-18 21:15 ` jvdelisle at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-11-18 21:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jvdelisle at gcc dot gnu dot org  2007-11-18 20:59 -------
Subject: Bug 33317

Author: jvdelisle
Date: Sun Nov 18 20:59:41 2007
New Revision: 130277

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130277
Log:
2007-11-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR fortran/33317
        * gfortran.dg/optional_dim_2.f90: New test.

        PR fortran/34139
        * gfortran.dg/subref_array_pointer_2.f90: Update test condition.

Added:
    trunk/gcc/testsuite/gfortran.dg/optional_dim_2.f90
Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/subref_array_pointer_2.f90


-- 


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


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

* [Bug fortran/33317] CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
  2007-09-05 20:59 [Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present burnus at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2007-11-18 21:00 ` jvdelisle at gcc dot gnu dot org
@ 2007-11-18 21:15 ` jvdelisle at gcc dot gnu dot org
  2007-11-18 22:46 ` dominiq at lps dot ens dot fr
                   ` (12 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-11-18 21:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jvdelisle at gcc dot gnu dot org  2007-11-18 21:15 -------
Fixed on trunk. Rev 130276

http://gcc.gnu.org/viewcvs/trunk/gcc/fortran/check.c?view=log&pathrev=130276


-- 

jvdelisle at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug fortran/33317] CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
  2007-09-05 20:59 [Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present burnus at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2007-11-18 21:15 ` jvdelisle at gcc dot gnu dot org
@ 2007-11-18 22:46 ` dominiq at lps dot ens dot fr
  2007-11-18 23:45 ` jvdelisle at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: dominiq at lps dot ens dot fr @ 2007-11-18 22:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from dominiq at lps dot ens dot fr  2007-11-18 22:46 -------
Sorry to reopen the bug, but I have a lot of failures in my tests. A reduced
case is:

integer(8) :: i
i = 1_8  
print *, cshift((/.true.,.false.,.true.,.false./),1,dim=i)
end

which fails at runtime with:

Fortran runtime error: Argument 'DIM' is out of range in call to 'CSHIFT'

As this is on PPC Darwin8, while this works on Intel Darwin9, could the problem
be related to some endian issue?


-- 


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


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

* [Bug fortran/33317] CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
  2007-09-05 20:59 [Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present burnus at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2007-11-18 22:46 ` dominiq at lps dot ens dot fr
@ 2007-11-18 23:45 ` jvdelisle at gcc dot gnu dot org
  2007-11-19  1:23 ` jvdelisle at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-11-18 23:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jvdelisle at gcc dot gnu dot org  2007-11-18 23:45 -------
No sorry necessary.  Could you post the -fdump-tree-original for your test
case?

In the mean time I will get logged on to a linux PPC machine and see if I see
it there.


-- 


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


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

* [Bug fortran/33317] CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
  2007-09-05 20:59 [Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present burnus at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2007-11-18 23:45 ` jvdelisle at gcc dot gnu dot org
@ 2007-11-19  1:23 ` jvdelisle at gcc dot gnu dot org
  2007-11-19  6:05 ` [Bug fortran/33317] [4.3 regression]CSHIFT/EOSHIFT: " jvdelisle at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-11-19  1:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from jvdelisle at gcc dot gnu dot org  2007-11-19 01:22 -------
I found the problem.  We key off of the kind of shift to determine which
version of the runtime to resolve to.  In your test case, shift is kind=4 so we
load in the cshift0_4 instead of the cshift0_8 version of cshift.  It shows up
because of endianess on PPC.

I was able to reproduce this on ppc linux.

Regardless, I will work up a patch.


-- 


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


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

* [Bug fortran/33317] [4.3 regression]CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
  2007-09-05 20:59 [Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present burnus at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2007-11-19  1:23 ` jvdelisle at gcc dot gnu dot org
@ 2007-11-19  6:05 ` jvdelisle at gcc dot gnu dot org
  2007-11-19  8:08 ` dominiq at lps dot ens dot fr
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-11-19  6:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from jvdelisle at gcc dot gnu dot org  2007-11-19 06:05 -------
Regressed on PPC.  I am working on a fix.  If I can not fix by end of tomorrow,
I will revert the previous patch


-- 

jvdelisle at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |
            Summary|CSHIFT/EOSHIFT: Rejects     |[4.3
                   |optional dummy for DIM=     |regression]CSHIFT/EOSHIFT:
                   |                            |Rejects optional dummy for
                   |                            |DIM=


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


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

* [Bug fortran/33317] [4.3 regression]CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
  2007-09-05 20:59 [Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present burnus at gcc dot gnu dot org
                   ` (12 preceding siblings ...)
  2007-11-19  6:05 ` [Bug fortran/33317] [4.3 regression]CSHIFT/EOSHIFT: " jvdelisle at gcc dot gnu dot org
@ 2007-11-19  8:08 ` dominiq at lps dot ens dot fr
  2007-11-20  1:38 ` jvdelisle at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: dominiq at lps dot ens dot fr @ 2007-11-19  8:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from dominiq at lps dot ens dot fr  2007-11-19 08:07 -------
Additional problem: gfortran.dg/optional_dim_2.f90 segfaults with -m64 on Intel
Darwin9.


-- 


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


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

* [Bug fortran/33317] [4.3 regression]CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
  2007-09-05 20:59 [Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present burnus at gcc dot gnu dot org
                   ` (13 preceding siblings ...)
  2007-11-19  8:08 ` dominiq at lps dot ens dot fr
@ 2007-11-20  1:38 ` jvdelisle at gcc dot gnu dot org
  2007-11-20  1:51 ` jvdelisle at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-11-20  1:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from jvdelisle at gcc dot gnu dot org  2007-11-20 01:37 -------
Subject: Bug 33317

Author: jvdelisle
Date: Tue Nov 20 01:37:43 2007
New Revision: 130304

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130304
Log:
2007-11-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR fortran/33317
        * trans-expr.c (gfc_conv_missing_dummy): Revert.
        * iresolve.c (gfc_resolve_cshift): Revert.
        (gfc_resolve_eoshift): Likewise.
        * check.c (gfc_check_cshift): Revert.
        (gfc_check_eoshift): Likewise.

Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/check.c
    trunk/gcc/fortran/iresolve.c
    trunk/gcc/fortran/trans-expr.c


-- 


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


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

* [Bug fortran/33317] [4.3 regression]CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
  2007-09-05 20:59 [Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present burnus at gcc dot gnu dot org
                   ` (14 preceding siblings ...)
  2007-11-20  1:38 ` jvdelisle at gcc dot gnu dot org
@ 2007-11-20  1:51 ` jvdelisle at gcc dot gnu dot org
  2007-11-20  4:47 ` [Bug fortran/33317] CSHIFT/EOSHIFT: " jvdelisle at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-11-20  1:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from jvdelisle at gcc dot gnu dot org  2007-11-20 01:51 -------
Subject: Bug 33317

Author: jvdelisle
Date: Tue Nov 20 01:51:04 2007
New Revision: 130305

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130305
Log:
2007-11-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR fortran/33317
        * gfortran.dg/optional_dim_2.f90: Remove test.

Removed:
    trunk/gcc/testsuite/gfortran.dg/optional_dim_2.f90
Modified:
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/33317] CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
  2007-09-05 20:59 [Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present burnus at gcc dot gnu dot org
                   ` (15 preceding siblings ...)
  2007-11-20  1:51 ` jvdelisle at gcc dot gnu dot org
@ 2007-11-20  4:47 ` jvdelisle at gcc dot gnu dot org
  2007-11-20  5:04 ` patchapp at dberlin dot org
                   ` (4 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-11-20  4:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from jvdelisle at gcc dot gnu dot org  2007-11-20 04:46 -------
Created an attachment (id=14583)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14583&action=view)
New patch for testing on Darwin and ppc

This patch regrssion tests OK on powerpc-linux-gnu.  Please test on the Darwin
Intel and ppc if you can.  The patch is against current trunk.


-- 


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


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

* [Bug fortran/33317] CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
  2007-09-05 20:59 [Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present burnus at gcc dot gnu dot org
                   ` (16 preceding siblings ...)
  2007-11-20  4:47 ` [Bug fortran/33317] CSHIFT/EOSHIFT: " jvdelisle at gcc dot gnu dot org
@ 2007-11-20  5:04 ` patchapp at dberlin dot org
  2007-11-23 15:15 ` patchapp at dberlin dot org
                   ` (3 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: patchapp at dberlin dot org @ 2007-11-20  5:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from patchapp at dberlin dot org  2007-11-20 05:04 -------
Subject: Bug number PR33317

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/2007-11/msg00962.html


-- 


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


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

* [Bug fortran/33317] CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
  2007-09-05 20:59 [Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present burnus at gcc dot gnu dot org
                   ` (17 preceding siblings ...)
  2007-11-20  5:04 ` patchapp at dberlin dot org
@ 2007-11-23 15:15 ` patchapp at dberlin dot org
  2007-11-24  0:25 ` jvdelisle at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: patchapp at dberlin dot org @ 2007-11-23 15:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from patchapp at dberlin dot org  2007-11-23 15:15 -------
Subject: Bug number PR33317

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/2007-11/msg01228.html


-- 


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


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

* [Bug fortran/33317] CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
  2007-09-05 20:59 [Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present burnus at gcc dot gnu dot org
                   ` (18 preceding siblings ...)
  2007-11-23 15:15 ` patchapp at dberlin dot org
@ 2007-11-24  0:25 ` jvdelisle at gcc dot gnu dot org
  2007-11-24  0:29 ` jvdelisle at gcc dot gnu dot org
  2007-11-24  0:36 ` jvdelisle at gcc dot gnu dot org
  21 siblings, 0 replies; 23+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-11-24  0:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from jvdelisle at gcc dot gnu dot org  2007-11-24 00:25 -------
Subject: Bug 33317

Author: jvdelisle
Date: Sat Nov 24 00:25:01 2007
New Revision: 130391

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130391
Log:
2007-11-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR fortran/34209
        * iresolve.c (gfc_resolve_nearest): If sign variable kind does not
match
        kind of input variable, convert it to match.

        PR fortran/33317
        * trans.h: Modify prototype for gfc_conv_missing_dummy.
        * trans-expr.c (gfc_conv_missing_dummy): Modify to pass an integer kind
        parameter in.  Set the type of the dummy to the kind given.
        (gfc_conv_function_call): Pass representation.length to
        gfc_conv_missing_dummy.
        * iresolve.c (gfc_resolve_cshift): Determine the correct kind to use
and
        if appropriate set representation.length to this kind value.
        (gfc_resolve_eoshift): Likewise.
        * check.c (gfc_check_cshift): Enable dim_check to allow DIM as an
        optional argument. (gfc_check_eoshift): Likewise.
        * trans_intrinsic.c (gfc_conv_intrinsic_function_args): Update call to
        gfc_conv_missing_dummy.

Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/check.c
    trunk/gcc/fortran/iresolve.c
    trunk/gcc/fortran/trans-expr.c
    trunk/gcc/fortran/trans-intrinsic.c
    trunk/gcc/fortran/trans.h


-- 


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


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

* [Bug fortran/33317] CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
  2007-09-05 20:59 [Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present burnus at gcc dot gnu dot org
                   ` (19 preceding siblings ...)
  2007-11-24  0:25 ` jvdelisle at gcc dot gnu dot org
@ 2007-11-24  0:29 ` jvdelisle at gcc dot gnu dot org
  2007-11-24  0:36 ` jvdelisle at gcc dot gnu dot org
  21 siblings, 0 replies; 23+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-11-24  0:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #19 from jvdelisle at gcc dot gnu dot org  2007-11-24 00:29 -------
Subject: Bug 33317

Author: jvdelisle
Date: Sat Nov 24 00:29:14 2007
New Revision: 130392

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130392
Log:
2007-11-23  Tobias Burnus  <burnus@net-b.de>

        PR fortran/34209
        * gfortran.dg/nearest_3.f90: New test.

2007-11-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR fortran/33317
        * gfortran.dg/optional_dim_2.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/nearest_3.f90
    trunk/gcc/testsuite/gfortran.dg/optional_dim_2.f90
Modified:
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/33317] CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
  2007-09-05 20:59 [Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present burnus at gcc dot gnu dot org
                   ` (20 preceding siblings ...)
  2007-11-24  0:29 ` jvdelisle at gcc dot gnu dot org
@ 2007-11-24  0:36 ` jvdelisle at gcc dot gnu dot org
  21 siblings, 0 replies; 23+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-11-24  0:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #20 from jvdelisle at gcc dot gnu dot org  2007-11-24 00:36 -------
Fixed on trunk.


-- 

jvdelisle at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2007-11-24  0:36 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-05 20:59 [Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present burnus at gcc dot gnu dot org
2007-09-05 21:04 ` [Bug fortran/33317] CSHIFT/EOSHIFT: " burnus at gcc dot gnu dot org
2007-09-05 21:20 ` [Bug fortran/33317] CSHIFT/EOSHIFT: Rejects optional dummy for DIM= burnus at gcc dot gnu dot org
2007-10-25  9:00 ` jv244 at cam dot ac dot uk
2007-10-25  9:39 ` dominiq at lps dot ens dot fr
2007-11-14  5:20 ` jvdelisle at gcc dot gnu dot org
2007-11-16  6:23 ` jvdelisle at gcc dot gnu dot org
2007-11-17 18:22 ` jvdelisle at gcc dot gnu dot org
2007-11-18 21:00 ` jvdelisle at gcc dot gnu dot org
2007-11-18 21:15 ` jvdelisle at gcc dot gnu dot org
2007-11-18 22:46 ` dominiq at lps dot ens dot fr
2007-11-18 23:45 ` jvdelisle at gcc dot gnu dot org
2007-11-19  1:23 ` jvdelisle at gcc dot gnu dot org
2007-11-19  6:05 ` [Bug fortran/33317] [4.3 regression]CSHIFT/EOSHIFT: " jvdelisle at gcc dot gnu dot org
2007-11-19  8:08 ` dominiq at lps dot ens dot fr
2007-11-20  1:38 ` jvdelisle at gcc dot gnu dot org
2007-11-20  1:51 ` jvdelisle at gcc dot gnu dot org
2007-11-20  4:47 ` [Bug fortran/33317] CSHIFT/EOSHIFT: " jvdelisle at gcc dot gnu dot org
2007-11-20  5:04 ` patchapp at dberlin dot org
2007-11-23 15:15 ` patchapp at dberlin dot org
2007-11-24  0:25 ` jvdelisle at gcc dot gnu dot org
2007-11-24  0:29 ` jvdelisle at gcc dot gnu dot org
2007-11-24  0:36 ` 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).