public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/16580] New: gfortran ICE on test g77.f-torture/execute/intrinsic77.f
@ 2004-07-16  1:10 billingd at gcc dot gnu dot org
  2004-07-17  3:16 ` [Bug fortran/16580] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: billingd at gcc dot gnu dot org @ 2004-07-16  1:10 UTC (permalink / raw)
  To: gcc-bugs

$ ../gfortran -B.. -L/usr/local/obj/gcc/i686-pc-cygwin/./libgfortran/.libs -
L/usr/local/obj/gcc/i686-pc-cygwin/./libiberty intrinsic77.f -o intrinsic77.exe
assertion "isym->resolve.f0 != NULL" failed: 
file "/usr/local/src/gcc/gcc/fortran/trans-decl.c", line 890
intrinsic77.f: In function `index_of_substring':
intrinsic77.f:369: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

-- 
           Summary: gfortran ICE on test g77.f-torture/execute/intrinsic77.f
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: billingd at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-cygwin


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


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

* [Bug fortran/16580] gfortran ICE on test g77.f-torture/execute/intrinsic77.f
  2004-07-16  1:10 [Bug fortran/16580] New: gfortran ICE on test g77.f-torture/execute/intrinsic77.f billingd at gcc dot gnu dot org
@ 2004-07-17  3:16 ` pinskia at gcc dot gnu dot org
  2004-07-17  3:18 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-17  3:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-07-17 03:16 -------
Confirmed, here is the reduced testcase for this ICE:
      subroutine p_i_chch(f,x1,x2,a,label)
c     Check if INTEGER f(x1,x2) equals a for CHARACTER x1 and x2
      character*(*) x1,x2
      integer f, a
      character*(*) label
      call c_i(f(x1,x2),a,label)
      end

      subroutine index_of_substring
      intrinsic index
      call c_i(INDEX('ABCDEF','C'),3,'INDEX 1')
      call p_i_chch(INDEX,'ABCDEF','C',3,'INDEX 2')
      end




-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2004-07-17 03:16:26
               date|                            |


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


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

* [Bug fortran/16580] gfortran ICE on test g77.f-torture/execute/intrinsic77.f
  2004-07-16  1:10 [Bug fortran/16580] New: gfortran ICE on test g77.f-torture/execute/intrinsic77.f billingd at gcc dot gnu dot org
  2004-07-17  3:16 ` [Bug fortran/16580] " pinskia at gcc dot gnu dot org
@ 2004-07-17  3:18 ` pinskia at gcc dot gnu dot org
  2004-07-19 15:28 ` reichelt at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-17  3:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-07-17 03:18 -------
That example should have been without the following line:
      call c_i(INDEX('ABCDEF','C'),3,'INDEX 1')

-- 


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


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

* [Bug fortran/16580] gfortran ICE on test g77.f-torture/execute/intrinsic77.f
  2004-07-16  1:10 [Bug fortran/16580] New: gfortran ICE on test g77.f-torture/execute/intrinsic77.f billingd at gcc dot gnu dot org
  2004-07-17  3:16 ` [Bug fortran/16580] " pinskia at gcc dot gnu dot org
  2004-07-17  3:18 ` pinskia at gcc dot gnu dot org
@ 2004-07-19 15:28 ` reichelt at gcc dot gnu dot org
  2004-07-21 21:16 ` tobi at gcc dot gnu dot org
  2005-01-06 14:40 ` tobi at gcc dot gnu dot org
  4 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-07-19 15:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-07-19 15:28 -------
Here's an even shorter testcase:

=================================
      subroutine FOO
      intrinsic INDEX
      call BAR(INDEX)
      end
=================================


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org


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


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

* [Bug fortran/16580] gfortran ICE on test g77.f-torture/execute/intrinsic77.f
  2004-07-16  1:10 [Bug fortran/16580] New: gfortran ICE on test g77.f-torture/execute/intrinsic77.f billingd at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-07-19 15:28 ` reichelt at gcc dot gnu dot org
@ 2004-07-21 21:16 ` tobi at gcc dot gnu dot org
  2005-01-06 14:40 ` tobi at gcc dot gnu dot org
  4 siblings, 0 replies; 8+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-07-21 21:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2004-07-21 21:16 -------
The lines surrounding the assertion read like this:
  if (sym->attr.intrinsic)
    {
      /* Call the resolution function to get the actual name.  This is
         a nasty hack which relies on the resolution functions only looking
	 at the first argument.  We pass NULL for the second argument
	 otherwise things like AINT get confused.  */
      isym = gfc_find_function (sym->name);
      assert (isym->resolve.f0 != NULL);

I remember seeing that g95 had some code in place for storing the actual name of
an instrinsic. But I also remember thinking that that code seemed very ad-hoc
(certainly less than this code, though), so I refreained from porting it. (I
currently have very little time, otherwise I'd look much closer into the issues
where I'm only throwing pointers now. sorry)

-- 


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


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

* [Bug fortran/16580] gfortran ICE on test g77.f-torture/execute/intrinsic77.f
  2004-07-16  1:10 [Bug fortran/16580] New: gfortran ICE on test g77.f-torture/execute/intrinsic77.f billingd at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-07-21 21:16 ` tobi at gcc dot gnu dot org
@ 2005-01-06 14:40 ` tobi at gcc dot gnu dot org
  4 siblings, 0 replies; 8+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-01-06 14:40 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |19292
              nThis|                            |


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


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

* [Bug fortran/16580] gfortran ICE on test g77.f-torture/execute/intrinsic77.f
       [not found] <bug-16580-270@http.gcc.gnu.org/bugzilla/>
  2006-10-02  7:10 ` fxcoudert at gcc dot gnu dot org
@ 2006-10-07 13:34 ` fxcoudert at gcc dot gnu dot org
  1 sibling, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-10-07 13:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from fxcoudert at gcc dot gnu dot org  2006-10-07 13:34 -------
Subject: Bug 16580

Author: fxcoudert
Date: Sat Oct  7 13:34:16 2006
New Revision: 117534

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117534
Log:
        PR fortran/16580
        PR fortran/29288

        * gcc/fortran/intrinsic.c (add_sym): Define the actual_ok when a
        gfc_intrinsic_sym structure is filled.
        (gfc_intrinsic_actual_ok): New function.
        (add_sym_0s, add_sym_1s, add_sym_2s, add_sym_3s, add_sym_4s,
        add_sym_5s): Intrinsic subroutines are not allowed as actual
        arguments, so we remove argument actual_ok.
        (add_functions): Correct the values for actual_ok of all intrinsics.
        (add_subroutines): Remove the actual_ok argument, which was never used.
        * gcc/fortran/intrinsic.h (gfc_intrinsic_actual_ok): New prototype.
        * gcc/fortran/gfortran.h (gfc_resolve_index_func): New prototype.
        * gcc/fortran/resolve.c (resolve_actual_arglist): Check whether
        an intrinsic used as an argument list is allowed there.
        * gcc/fortran/iresolve.c (gfc_resolve_index_func): New function.
        (gfc_resolve_len): Change intrinsic function name to agree with
        libgfortran.
        * gcc/fortran/trans-decl.c (gfc_get_extern_function_decl): Add
        new case, because some specific intrinsics take 3 arguments.
        * gcc/fortran/intrinsic.texi: DIMAG is a GNU extension.

        * libgfortran/Makefile.am: Add the new files to the build
        process, and rules to build them.
        * libgfortran/Makefile.in: Regenerate.
        * libgfortran/m4/misc_specifics.m4: New file.
        * libgfortran/m4/specific.m4: Add new special cases for function
        with complex argument and real result, like abs_c* and aimag_c*.
        * libgfortran/intrinsics/f2c_specifics.F90: Add specifics for
        AIMAG, ASINH, ACOSH and ATANH.
        * libgfortran/generated/_aimag_c4.F90: New file.
        * libgfortran/generated/_aimag_c8.F90: New file.
        * libgfortran/generated/_asinh_r10.F90: New file.
        * libgfortran/generated/_acosh_r16.F90: New file.
        * libgfortran/generated/_aimag_c10.F90: New file.
        * libgfortran/generated/_atanh_r16.F90: New file.
        * libgfortran/generated/_acosh_r4.F90: New file.
        * libgfortran/generated/_acosh_r8.F90: New file.
        * libgfortran/generated/_asinh_r4.F90: New file.
        * libgfortran/generated/_asinh_r8.F90: New file.
        * libgfortran/generated/_asinh_r16.F90: New file.
        * libgfortran/generated/_atanh_r4.F90: New file.
        * libgfortran/generated/_atanh_r8.F90: New file.
        * libgfortran/generated/_acosh_r10.F90: New file.
        * libgfortran/generated/misc_specifics.F90: New file.
        * libgfortran/generated/_aimag_c16.F90: New file.
        * libgfortran/generated/_atanh_r10.F90: New file.

        * gcc/testsuite/gfortran.fortran-torture/execute/specifics.f90:
        Add tests for using all possible intrinsics as actual arguments.
        * gcc/testsuite/gfortran.dg/specifics_1.f90: Add tests for using
        all possible intrinsics as actual arguments.
        * gcc/testsuite/gfortran.dg/specifics_2.f90: New file.
        * gcc/testsuite/gfortran.dg/specifics_3.f90: New file.

Added:
    trunk/gcc/testsuite/gfortran.dg/specifics_2.f90
    trunk/gcc/testsuite/gfortran.dg/specifics_3.f90
    trunk/libgfortran/generated/_acosh_r10.F90
    trunk/libgfortran/generated/_acosh_r16.F90
    trunk/libgfortran/generated/_acosh_r4.F90
    trunk/libgfortran/generated/_acosh_r8.F90
    trunk/libgfortran/generated/_aimag_c10.F90
    trunk/libgfortran/generated/_aimag_c16.F90
    trunk/libgfortran/generated/_aimag_c4.F90
    trunk/libgfortran/generated/_aimag_c8.F90
    trunk/libgfortran/generated/_asinh_r10.F90
    trunk/libgfortran/generated/_asinh_r16.F90
    trunk/libgfortran/generated/_asinh_r4.F90
    trunk/libgfortran/generated/_asinh_r8.F90
    trunk/libgfortran/generated/_atanh_r10.F90
    trunk/libgfortran/generated/_atanh_r16.F90
    trunk/libgfortran/generated/_atanh_r4.F90
    trunk/libgfortran/generated/_atanh_r8.F90
    trunk/libgfortran/generated/misc_specifics.F90
    trunk/libgfortran/m4/misc_specifics.m4
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/intrinsic.c
    trunk/gcc/fortran/intrinsic.h
    trunk/gcc/fortran/intrinsic.texi
    trunk/gcc/fortran/iresolve.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/trans-decl.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/specifics_1.f90
    trunk/gcc/testsuite/gfortran.fortran-torture/execute/specifics.f90
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/Makefile.am
    trunk/libgfortran/Makefile.in
    trunk/libgfortran/intrinsics/f2c_specifics.F90
    trunk/libgfortran/m4/specific.m4


-- 


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


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

* [Bug fortran/16580] gfortran ICE on test g77.f-torture/execute/intrinsic77.f
       [not found] <bug-16580-270@http.gcc.gnu.org/bugzilla/>
@ 2006-10-02  7:10 ` fxcoudert at gcc dot gnu dot org
  2006-10-07 13:34 ` fxcoudert at gcc dot gnu dot org
  1 sibling, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-10-02  7:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from fxcoudert at gcc dot gnu dot org  2006-10-02 07:10 -------
Patch submitted here: http://gcc.gnu.org/ml/fortran/2006-10/msg00022.html


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |fxcoudert at gcc dot gnu dot
                   |dot org                     |org
                URL|                            |http://gcc.gnu.org/ml/fortra
                   |                            |n/2006-10/msg00022.html
             Status|NEW                         |ASSIGNED
   GCC host triplet|i686-pc-cygwin              |
           Keywords|                            |patch
      Known to fail|                            |4.2.0 4.1.2
   Last reconfirmed|2006-07-09 10:14:53         |2006-10-02 07:10:19
               date|                            |
   Target Milestone|---                         |4.2.0


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


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

end of thread, other threads:[~2006-10-07 13:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-16  1:10 [Bug fortran/16580] New: gfortran ICE on test g77.f-torture/execute/intrinsic77.f billingd at gcc dot gnu dot org
2004-07-17  3:16 ` [Bug fortran/16580] " pinskia at gcc dot gnu dot org
2004-07-17  3:18 ` pinskia at gcc dot gnu dot org
2004-07-19 15:28 ` reichelt at gcc dot gnu dot org
2004-07-21 21:16 ` tobi at gcc dot gnu dot org
2005-01-06 14:40 ` tobi at gcc dot gnu dot org
     [not found] <bug-16580-270@http.gcc.gnu.org/bugzilla/>
2006-10-02  7:10 ` fxcoudert at gcc dot gnu dot org
2006-10-07 13:34 ` fxcoudert 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).