public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/15963] New: Error when using count in initialization expression
@ 2004-06-12 14:55 Mart dot Rentmeester at nn-online dot org
  2004-06-13  9:10 ` [Bug fortran/15963] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Mart dot Rentmeester at nn-online dot org @ 2004-06-12 14:55 UTC (permalink / raw)
  To: gcc-bugs

The following code generates a compiler error.
It happens only when a and b are of non-numerical type;
and only in an initialization expression.
When array b wouldn't be used and only 
write(6,*) count(a < 'D') 
was used the compiler accepts it.


troogle> gfortran -c -v n11.f95
Reading specs from /OPT/32/gcc-2004-06-09/lib/gcc/hppa2.0w-hp-hpux11.11/3.5.
0/specs
Configured with: ../configure --enable-languages=c,f95 
--prefix=/opt32/gcc-2004-06-09 --with-gmp=/opt32/gmp --with-gnu-as 
--with-as=/opt32/binutils/bin/as --enable-threads --disable-shared --disable-nls
Thread model: posix
gcc version 3.5.0 20040611 (experimental)
 /OPT/32/gcc-2004-06-09/libexec/gcc/hppa2.0w-hp-hpux11.11/3.5.0/f951 n11.f95 
-quiet -dumpbase n11.f95 -auxbase n11 -version -o /var/tmp//ccCVK5zQ.s
GNU F95 version 3.5.0 20040611 (experimental) (hppa2.0w-hp-hpux11.11)
        compiled by GNU C version 3.5.0 20040611 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096


 In file n11.f95:8

write(6,*) write(6,*) size(b)
                  1
Error: Syntax error in argument list at (1)
 In file n11.f95:5

character(8)              :: b(count(a < 'D'))
                                    1
Error: Numeric operands are required in expression at (1)






subroutine x(a)

implicit none
character(8), intent(in)  :: a(10)
character(8)              :: b(count(a < 'D'))

write(6,*) size(b)

end subroutine x

-- 
           Summary: Error when using count in initialization expression
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Mart dot Rentmeester at nn-online dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug fortran/15963] Error when using count in initialization expression
  2004-06-12 14:55 [Bug fortran/15963] New: Error when using count in initialization expression Mart dot Rentmeester at nn-online dot org
@ 2004-06-13  9:10 ` pinskia at gcc dot gnu dot org
  2004-06-22 14:39 ` [Bug fortran/15963] Error when comparing characters in restricted expression tobi at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-13  9:10 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-13 09:10 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |rejects-valid
   Last reconfirmed|0000-00-00 00:00:00         |2004-06-13 09:10:22
               date|                            |


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


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

* [Bug fortran/15963] Error when comparing characters in restricted expression
  2004-06-12 14:55 [Bug fortran/15963] New: Error when using count in initialization expression Mart dot Rentmeester at nn-online dot org
  2004-06-13  9:10 ` [Bug fortran/15963] " pinskia at gcc dot gnu dot org
@ 2004-06-22 14:39 ` tobi at gcc dot gnu dot org
  2004-06-29 17:02 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-06-22 14:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2004-06-22 14:39 -------
Patch here: http://gcc.gnu.org/ml/fortran/2004-06/msg00242.html
Fixed sumamry line. Acsepted bug.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Keywords|                            |patch
   Last reconfirmed|2004-06-13 09:10:22         |2004-06-22 14:39:16
               date|                            |
            Summary|Error when using count in   |Error when comparing
                   |initialization expression   |characters in restricted
                   |                            |expression


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


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

* [Bug fortran/15963] Error when comparing characters in restricted expression
  2004-06-12 14:55 [Bug fortran/15963] New: Error when using count in initialization expression Mart dot Rentmeester at nn-online dot org
  2004-06-13  9:10 ` [Bug fortran/15963] " pinskia at gcc dot gnu dot org
  2004-06-22 14:39 ` [Bug fortran/15963] Error when comparing characters in restricted expression tobi at gcc dot gnu dot org
@ 2004-06-29 17:02 ` cvs-commit at gcc dot gnu dot org
  2004-06-29 17:23 ` tobi at gcc dot gnu dot org
  2004-06-30 22:12 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-29 17:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-06-29 17:01 -------
Subject: Bug 15963

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	tobi@gcc.gnu.org	2004-06-29 17:01:36

Modified files:
	gcc/fortran    : ChangeLog expr.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gfortran.fortran-torture/execute: 
	                                                initialization_1.f90 

Log message:
	fortran/
	PR fortran/15963
	* expr.c (check_intrinsic_op): Allow comparison of characters.
	Make logic easier.
	
	testsuite/
	PR fortran/15963
	* gfortran.fortran-torture/execute/initialization_1.f90: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.85&r2=1.86
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/expr.c.diff?cvsroot=gcc&r1=1.7&r2=1.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3915&r2=1.3916
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.fortran-torture/execute/initialization_1.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug fortran/15963] Error when comparing characters in restricted expression
  2004-06-12 14:55 [Bug fortran/15963] New: Error when using count in initialization expression Mart dot Rentmeester at nn-online dot org
                   ` (2 preceding siblings ...)
  2004-06-29 17:02 ` cvs-commit at gcc dot gnu dot org
@ 2004-06-29 17:23 ` tobi at gcc dot gnu dot org
  2004-06-30 22:12 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-06-29 17:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2004-06-29 17:23 -------
Fixed.

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


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


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

* [Bug fortran/15963] Error when comparing characters in restricted expression
  2004-06-12 14:55 [Bug fortran/15963] New: Error when using count in initialization expression Mart dot Rentmeester at nn-online dot org
                   ` (3 preceding siblings ...)
  2004-06-29 17:23 ` tobi at gcc dot gnu dot org
@ 2004-06-30 22:12 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-30 22:12 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |3.5.0


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


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

end of thread, other threads:[~2004-06-30 22:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-12 14:55 [Bug fortran/15963] New: Error when using count in initialization expression Mart dot Rentmeester at nn-online dot org
2004-06-13  9:10 ` [Bug fortran/15963] " pinskia at gcc dot gnu dot org
2004-06-22 14:39 ` [Bug fortran/15963] Error when comparing characters in restricted expression tobi at gcc dot gnu dot org
2004-06-29 17:02 ` cvs-commit at gcc dot gnu dot org
2004-06-29 17:23 ` tobi at gcc dot gnu dot org
2004-06-30 22:12 ` 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).