public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/20879] New: error needed
@ 2005-04-08 16:00 jv244 at cam dot ac dot uk
  2005-04-22 15:04 ` [Bug fortran/20879] argument to ICHAR must have length one tobi at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: jv244 at cam dot ac dot uk @ 2005-04-08 16:00 UTC (permalink / raw)
  To: gcc-bugs

The following is non-standard and the compiler should probably generate a
warning/error with '-pedantic -std=f95'


CHARACTER(LEN=10) :: test
write(6,*) ICHAR(test)
END

-- 
           Summary: error needed
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jv244 at cam dot ac dot uk
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug fortran/20879] argument to ICHAR must have length one
  2005-04-08 16:00 [Bug fortran/20879] New: error needed jv244 at cam dot ac dot uk
@ 2005-04-22 15:04 ` tobi at gcc dot gnu dot org
  2005-04-24  4:04 ` kargl at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-04-22 15:04 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |accepts-invalid
   Last reconfirmed|0000-00-00 00:00:00         |2005-04-22 15:00:42
               date|                            |
            Summary|error needed                |argument to ICHAR must have
                   |                            |length one


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


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

* [Bug fortran/20879] argument to ICHAR must have length one
  2005-04-08 16:00 [Bug fortran/20879] New: error needed jv244 at cam dot ac dot uk
  2005-04-22 15:04 ` [Bug fortran/20879] argument to ICHAR must have length one tobi at gcc dot gnu dot org
@ 2005-04-24  4:04 ` kargl at gcc dot gnu dot org
  2005-04-24 14:23 ` pbrook at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: kargl at gcc dot gnu dot org @ 2005-04-24  4:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From kargl at gcc dot gnu dot org  2005-04-24 04:04 -------
Here's a partial fix to the problem.  Unfortunately, it
doesn't detect the problem in Joost's program, which 
requires a runtime check.

http://gcc.gnu.org/ml/gcc-patches/2005-04/msg02507.html

-- 


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


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

* [Bug fortran/20879] argument to ICHAR must have length one
  2005-04-08 16:00 [Bug fortran/20879] New: error needed jv244 at cam dot ac dot uk
  2005-04-22 15:04 ` [Bug fortran/20879] argument to ICHAR must have length one tobi at gcc dot gnu dot org
  2005-04-24  4:04 ` kargl at gcc dot gnu dot org
@ 2005-04-24 14:23 ` pbrook at gcc dot gnu dot org
  2005-04-24 23:51 ` tobi at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pbrook at gcc dot gnu dot org @ 2005-04-24 14:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pbrook at gcc dot gnu dot org  2005-04-24 14:23 -------
The original testcase can (and should) be checked at compile time. The argument
is a simple variable of known length.
The error should be unconditional (ie. not just when -pedantic is specified)

-- 


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


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

* [Bug fortran/20879] argument to ICHAR must have length one
  2005-04-08 16:00 [Bug fortran/20879] New: error needed jv244 at cam dot ac dot uk
                   ` (2 preceding siblings ...)
  2005-04-24 14:23 ` pbrook at gcc dot gnu dot org
@ 2005-04-24 23:51 ` tobi at gcc dot gnu dot org
  2005-04-25  0:09 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-04-24 23:51 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2005-04-24 23:51 -------
The checks in gfc_simplify_ichar (_iachar) don't catch this because they only
look at the string length if the expression is constant.

-- 


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


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

* [Bug fortran/20879] argument to ICHAR must have length one
  2005-04-08 16:00 [Bug fortran/20879] New: error needed jv244 at cam dot ac dot uk
                   ` (4 preceding siblings ...)
  2005-04-25  0:09 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-25  0:09 ` cvs-commit at gcc dot gnu dot org
  2005-06-06  0:29 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-25  0:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-25 00:09 -------
Subject: Bug 20879

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	pbrook@gcc.gnu.org	2005-04-25 00:09:17

Modified files:
	gcc/fortran    : ChangeLog check.c intrinsic.c intrinsic.h 
	                 primary.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gfortran.dg: ichar_1.f90 

Log message:
	2005-04-25  Paul Brook  <paul@codesourcery.com>
	Steven G. Kargl  <kargls@comcast.net>
	
	PR fortran/20879
	* check.c (gfc_check_ichar_iachar): New function.
	* instinsic.h (gfc_check_ichar_iachar): Add prototype.
	* intrinsic.c (add_functions): Use it.
	* primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
	character expression lengths.
	
	testsuite/
	* gfortran.dg/ichar_1.f90: New file.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.335.2.38&r2=1.335.2.39
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/check.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.29.2.1&r2=1.29.2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/intrinsic.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.44.2.1&r2=1.44.2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/intrinsic.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.27.2.1&r2=1.27.2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/primary.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.22.2.2&r2=1.22.2.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.137&r2=1.5084.2.138
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/ichar_1.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-25 00:09 -------
Subject: Bug 20879

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	pbrook@gcc.gnu.org	2005-04-25 00:09:12

Modified files:
	gcc/fortran    : ChangeLog check.c intrinsic.c intrinsic.h 
	                 primary.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gfortran.dg: ichar_1.f90 

Log message:
	2005-04-25  Paul Brook  <paul@codesourcery.com>
	Steven G. Kargl  <kargls@comcast.net>
	
	PR fortran/20879
	* check.c (gfc_check_ichar_iachar): New function.
	* instinsic.h (gfc_check_ichar_iachar): Add prototype.
	* intrinsic.c (add_functions): Use it.
	* primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
	character expression lengths.
	
	testsuite/
	* gfortran.dg/ichar_1.f90: New file.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.405&r2=1.406
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/check.c.diff?cvsroot=gcc&r1=1.30&r2=1.31
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/intrinsic.c.diff?cvsroot=gcc&r1=1.45&r2=1.46
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/intrinsic.h.diff?cvsroot=gcc&r1=1.28&r2=1.29
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/primary.c.diff?cvsroot=gcc&r1=1.24&r2=1.25
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5393&r2=1.5394
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/ichar_1.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug fortran/20879] argument to ICHAR must have length one
  2005-04-08 16:00 [Bug fortran/20879] New: error needed jv244 at cam dot ac dot uk
                   ` (3 preceding siblings ...)
  2005-04-24 23:51 ` tobi at gcc dot gnu dot org
@ 2005-04-25  0:09 ` cvs-commit at gcc dot gnu dot org
  2005-04-25  0:09 ` cvs-commit at gcc dot gnu dot org
  2005-06-06  0:29 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-25  0:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-25 00:09 -------
Subject: Bug 20879

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	pbrook@gcc.gnu.org	2005-04-25 00:09:17

Modified files:
	gcc/fortran    : ChangeLog check.c intrinsic.c intrinsic.h 
	                 primary.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gfortran.dg: ichar_1.f90 

Log message:
	2005-04-25  Paul Brook  <paul@codesourcery.com>
	Steven G. Kargl  <kargls@comcast.net>
	
	PR fortran/20879
	* check.c (gfc_check_ichar_iachar): New function.
	* instinsic.h (gfc_check_ichar_iachar): Add prototype.
	* intrinsic.c (add_functions): Use it.
	* primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
	character expression lengths.
	
	testsuite/
	* gfortran.dg/ichar_1.f90: New file.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.335.2.38&r2=1.335.2.39
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/check.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.29.2.1&r2=1.29.2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/intrinsic.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.44.2.1&r2=1.44.2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/intrinsic.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.27.2.1&r2=1.27.2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/primary.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.22.2.2&r2=1.22.2.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.137&r2=1.5084.2.138
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/ichar_1.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-25 00:09 -------
Subject: Bug 20879

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	pbrook@gcc.gnu.org	2005-04-25 00:09:12

Modified files:
	gcc/fortran    : ChangeLog check.c intrinsic.c intrinsic.h 
	                 primary.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gfortran.dg: ichar_1.f90 

Log message:
	2005-04-25  Paul Brook  <paul@codesourcery.com>
	Steven G. Kargl  <kargls@comcast.net>
	
	PR fortran/20879
	* check.c (gfc_check_ichar_iachar): New function.
	* instinsic.h (gfc_check_ichar_iachar): Add prototype.
	* intrinsic.c (add_functions): Use it.
	* primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
	character expression lengths.
	
	testsuite/
	* gfortran.dg/ichar_1.f90: New file.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.405&r2=1.406
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/check.c.diff?cvsroot=gcc&r1=1.30&r2=1.31
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/intrinsic.c.diff?cvsroot=gcc&r1=1.45&r2=1.46
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/intrinsic.h.diff?cvsroot=gcc&r1=1.28&r2=1.29
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/primary.c.diff?cvsroot=gcc&r1=1.24&r2=1.25
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5393&r2=1.5394
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/ichar_1.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug fortran/20879] argument to ICHAR must have length one
  2005-04-08 16:00 [Bug fortran/20879] New: error needed jv244 at cam dot ac dot uk
                   ` (5 preceding siblings ...)
  2005-04-25  0:09 ` cvs-commit at gcc dot gnu dot org
@ 2005-06-06  0:29 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-06  0:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-06-06 00:29 -------
Fixed in 4.0.1.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.1


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


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

end of thread, other threads:[~2005-06-06  0:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-08 16:00 [Bug fortran/20879] New: error needed jv244 at cam dot ac dot uk
2005-04-22 15:04 ` [Bug fortran/20879] argument to ICHAR must have length one tobi at gcc dot gnu dot org
2005-04-24  4:04 ` kargl at gcc dot gnu dot org
2005-04-24 14:23 ` pbrook at gcc dot gnu dot org
2005-04-24 23:51 ` tobi at gcc dot gnu dot org
2005-04-25  0:09 ` cvs-commit at gcc dot gnu dot org
2005-04-25  0:09 ` cvs-commit at gcc dot gnu dot org
2005-06-06  0:29 ` 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).