public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/18737] New: ICE on invalid use of external keyword
@ 2004-11-30 13:06 coudert at clipper dot ens dot fr
  2004-11-30 14:03 ` [Bug fortran/18737] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: coudert at clipper dot ens dot fr @ 2004-11-30 13:06 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 736 bytes --]

$ cat a.f90 
program test
  implicit none
  real(8) :: x
  external bug

  x = 2
  print *, bug(x)
  
end program test


$ gfortran -c a.f90
a.f90: In function ‘MAIN__’:
a.f90:7: internal compiler error: in gfc_typenode_for_spec, at
fortran/trans-types.c:613

-- 
           Summary: ICE on invalid use of external keyword
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: coudert at clipper dot ens dot fr
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-unkown-linux


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


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

* [Bug fortran/18737] ICE on invalid use of external keyword
  2004-11-30 13:06 [Bug fortran/18737] New: ICE on invalid use of external keyword coudert at clipper dot ens dot fr
@ 2004-11-30 14:03 ` pinskia at gcc dot gnu dot org
  2005-01-06 14:42 ` tobi at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-30 14:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-30 14:03 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-invalid-code
   Last reconfirmed|0000-00-00 00:00:00         |2004-11-30 14:03:39
               date|                            |


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


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

* [Bug fortran/18737] ICE on invalid use of external keyword
  2004-11-30 13:06 [Bug fortran/18737] New: ICE on invalid use of external keyword coudert at clipper dot ens dot fr
  2004-11-30 14:03 ` [Bug fortran/18737] " pinskia at gcc dot gnu dot org
@ 2005-01-06 14:42 ` tobi at gcc dot gnu dot org
  2005-03-14 20:34 ` tobi at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-01-06 14:42 UTC (permalink / raw)
  To: gcc-bugs



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


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


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

* [Bug fortran/18737] ICE on invalid use of external keyword
  2004-11-30 13:06 [Bug fortran/18737] New: ICE on invalid use of external keyword coudert at clipper dot ens dot fr
  2004-11-30 14:03 ` [Bug fortran/18737] " pinskia at gcc dot gnu dot org
  2005-01-06 14:42 ` tobi at gcc dot gnu dot org
@ 2005-03-14 20:34 ` tobi at gcc dot gnu dot org
  2005-03-14 20:37 ` tobi at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-03-14 20:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2005-03-14 20:34 -------
Actually, this slightly modified valid testcase fails with the same error:
program test
!  implicit none
  real(8) :: x
  external bug

  x = 2
  print *, bug(x)
  
end program test




-- 


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


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

* [Bug fortran/18737] ICE on invalid use of external keyword
  2004-11-30 13:06 [Bug fortran/18737] New: ICE on invalid use of external keyword coudert at clipper dot ens dot fr
                   ` (2 preceding siblings ...)
  2005-03-14 20:34 ` tobi at gcc dot gnu dot org
@ 2005-03-14 20:37 ` tobi at gcc dot gnu dot org
  2005-03-14 20:52 ` tobi at gcc dot gnu dot org
  2005-08-03 11:42 ` paulthomas2 at wanadoo dot fr
  5 siblings, 0 replies; 10+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-03-14 20:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2005-03-14 20:37 -------
Excuse, the testcase with "implicit none" commented out passes.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2005-03-01 14:09:30         |2005-03-14 20:37:30
               date|                            |


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


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

* [Bug fortran/18737] ICE on invalid use of external keyword
  2004-11-30 13:06 [Bug fortran/18737] New: ICE on invalid use of external keyword coudert at clipper dot ens dot fr
                   ` (3 preceding siblings ...)
  2005-03-14 20:37 ` tobi at gcc dot gnu dot org
@ 2005-03-14 20:52 ` tobi at gcc dot gnu dot org
  2005-08-03 11:42 ` paulthomas2 at wanadoo dot fr
  5 siblings, 0 replies; 10+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-03-14 20:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2005-03-14 20:52 -------
The bug is caused by the call to gfc_set_default_type in resolve.c:3961 passing
0 as second argument, thereby suppressing the error that should be issued there.
 Unfortunately, passing 1 for the argument breaks code which calls intrinsic
functions.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2005-03-14 20:37:30         |2005-03-14 20:52:30
               date|                            |


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


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

* [Bug fortran/18737] ICE on invalid use of external keyword
  2004-11-30 13:06 [Bug fortran/18737] New: ICE on invalid use of external keyword coudert at clipper dot ens dot fr
                   ` (4 preceding siblings ...)
  2005-03-14 20:52 ` tobi at gcc dot gnu dot org
@ 2005-08-03 11:42 ` paulthomas2 at wanadoo dot fr
  5 siblings, 0 replies; 10+ messages in thread
From: paulthomas2 at wanadoo dot fr @ 2005-08-03 11:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From paulthomas2 at wanadoo dot fr  2005-08-03 11:42 -------
(In reply to comment #4)
> The bug is caused by the call to gfc_set_default_type in resolve.c:3961 
passing
> 0 as second argument, thereby suppressing the error that should be issued 
there.
>  Unfortunately, passing 1 for the argument breaks code which calls intrinsic
> functions.

This sounds familiar!  I can add this to the pr16940 fix; ie. before calling 
gfc_set_default_type, we look for an external declaration, as well as a generic 
interface.  I'll put it on the TODO list.

Paul T


-- 


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


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

* [Bug fortran/18737] ICE on invalid use of external keyword
       [not found] <bug-18737-10259@http.gcc.gnu.org/bugzilla/>
  2005-11-01  5:53 ` pault at gcc dot gnu dot org
  2005-11-01 12:15 ` pault at gcc dot gnu dot org
@ 2005-11-01 12:58 ` tobi at gcc dot gnu dot org
  2 siblings, 0 replies; 10+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-11-01 12:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from tobi at gcc dot gnu dot org  2005-11-01 12:58 -------
Fixed by Paul's patch.


-- 

tobi at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tobi at gcc dot gnu dot org,
                   |                            |pault at gcc dot gnu dot org
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.3


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


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

* [Bug fortran/18737] ICE on invalid use of external keyword
       [not found] <bug-18737-10259@http.gcc.gnu.org/bugzilla/>
  2005-11-01  5:53 ` pault at gcc dot gnu dot org
@ 2005-11-01 12:15 ` pault at gcc dot gnu dot org
  2005-11-01 12:58 ` tobi at gcc dot gnu dot org
  2 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu dot org @ 2005-11-01 12:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pault at gcc dot gnu dot org  2005-11-01 12:15 -------
Subject: Bug 18737

Author: pault
Date: Tue Nov  1 12:15:07 2005
New Revision: 106326

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106326
Log:
2005-11-01  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/21565
        * symbol.c (check_conflict): An object cannot be in a namelist and in
        block data.

        PR fortran/18737
        * resolve.c (resolve_symbol): Set the error flag to
        gfc_set_default_type, in the case of an external symbol, so that
        an error message is emitted if IMPLICIT NONE is set.

        PR fortran/14994
        * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SECNDS to enum.
        * check.c (gfc_check_secnds): New function.
        * intrinsic.c (add_functions): Add call to secnds.
        * iresolve.c (gfc_resolve_secnds): New function.
        * trans-intrinsic (gfc_conv_intrinsic_function): Add call to
        secnds via case GFC_ISYM_SECNDS.
        * intrinsic.texi: Add documentation for secnds.

2005-11-01  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/14994
        * libgfortran/intrinsics/date_and_time.c: Add interface to
        the functions date_and_time for the intrinsic function secnds.

2005-11-01  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/21565
        gfortran.dg/namelist_blockdata.f90: New test.

        PR fortran/18737
        gfortran.dg/external_implicit_none.f90: New test.

        PR fortran/14994
        * gfortran.dg/secnds.f: New test.

Added:
   
branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/external_implicit_none.f90
    branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/namelist_blockdata.f
    branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/secnds.f
Modified:
    branches/gcc-4_0-branch/gcc/fortran/ChangeLog
    branches/gcc-4_0-branch/gcc/fortran/check.c
    branches/gcc-4_0-branch/gcc/fortran/gfortran.h
    branches/gcc-4_0-branch/gcc/fortran/intrinsic.c
    branches/gcc-4_0-branch/gcc/fortran/intrinsic.h
    branches/gcc-4_0-branch/gcc/fortran/intrinsic.texi
    branches/gcc-4_0-branch/gcc/fortran/iresolve.c
    branches/gcc-4_0-branch/gcc/fortran/resolve.c
    branches/gcc-4_0-branch/gcc/fortran/symbol.c
    branches/gcc-4_0-branch/gcc/fortran/trans-intrinsic.c
    branches/gcc-4_0-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_0-branch/libgfortran/ChangeLog
    branches/gcc-4_0-branch/libgfortran/intrinsics/date_and_time.c


-- 


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


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

* [Bug fortran/18737] ICE on invalid use of external keyword
       [not found] <bug-18737-10259@http.gcc.gnu.org/bugzilla/>
@ 2005-11-01  5:53 ` pault at gcc dot gnu dot org
  2005-11-01 12:15 ` pault at gcc dot gnu dot org
  2005-11-01 12:58 ` tobi at gcc dot gnu dot org
  2 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu dot org @ 2005-11-01  5:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pault at gcc dot gnu dot org  2005-11-01 05:53 -------
Subject: Bug 18737

Author: pault
Date: Tue Nov  1 05:53:29 2005
New Revision: 106317

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106317
Log:
2005-11-01  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/21565
        * symbol.c (check_conflict): An object cannot be in a namelist and in
        block data.

        PR fortran/18737
        * resolve.c (resolve_symbol): Set the error flag to
        gfc_set_default_type, in the case of an external symbol, so that
        an error message is emitted if IMPLICIT NONE is set.

        PR fortran/14994
        * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SECNDS to enum.
        * check.c (gfc_check_secnds): New function.
        * intrinsic.c (add_functions): Add call to secnds.
        * iresolve.c (gfc_resolve_secnds): New function.
        * trans-intrinsic (gfc_conv_intrinsic_function): Add call to
        secnds via case GFC_ISYM_SECNDS.
        * intrinsic.texi: Add documentation for secnds.

2005-11-01  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/14994
        * libgfortran/intrinsics/date_and_time.c: Add interface to
        the functions date_and_time for the intrinsic function secnds.

2005-11-01  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/21565
        gfortran.dg/namelist_blockdata.f90: New test.

        PR fortran/18737
        gfortran.dg/external_implicit_none.f90: New test.

        PR fortran/14994
        * gfortran.dg/secnds.f: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/external_implicit_none.f90
    trunk/gcc/testsuite/gfortran.dg/namelist_blockdata.f
    trunk/gcc/testsuite/gfortran.dg/secnds.f
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/check.c
    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/symbol.c
    trunk/gcc/fortran/trans-intrinsic.c
    trunk/gcc/testsuite/ChangeLog
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/intrinsics/date_and_time.c


-- 


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


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

end of thread, other threads:[~2005-11-01 12:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-30 13:06 [Bug fortran/18737] New: ICE on invalid use of external keyword coudert at clipper dot ens dot fr
2004-11-30 14:03 ` [Bug fortran/18737] " pinskia at gcc dot gnu dot org
2005-01-06 14:42 ` tobi at gcc dot gnu dot org
2005-03-14 20:34 ` tobi at gcc dot gnu dot org
2005-03-14 20:37 ` tobi at gcc dot gnu dot org
2005-03-14 20:52 ` tobi at gcc dot gnu dot org
2005-08-03 11:42 ` paulthomas2 at wanadoo dot fr
     [not found] <bug-18737-10259@http.gcc.gnu.org/bugzilla/>
2005-11-01  5:53 ` pault at gcc dot gnu dot org
2005-11-01 12:15 ` pault at gcc dot gnu dot org
2005-11-01 12:58 ` tobi 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).