public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/17568] New: ISHFT intrinsic: bogus overflow error
@ 2004-09-20 12:23 anlauf at hep dot tu-darmstadt dot de
  2004-09-20 13:09 ` [Bug fortran/17568] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: anlauf at hep dot tu-darmstadt dot de @ 2004-09-20 12:23 UTC (permalink / raw)
  To: gcc-bugs

Hi,

the following code

program gfcbug9
  implicit none
  integer, parameter :: nbits = bit_size (1)
  integer            :: res
  res = ishft (1, nbits-1)
  print *, res
end program gfcbug9


fails to compile with the error message:


 In file gfcbug9.f90:5

  res = ishft (1, nbits-1)
              1
Error: Result of ISHFT overflows its kind at (1)


This is a bug.  AFAIK all bits that drop out left or right just
should get lost.  The only constraint (abs(shift) < bit_size) is
satisfied.

Cheers,
-ha

-- 
           Summary: ISHFT intrinsic: bogus overflow error
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: anlauf at hep dot tu-darmstadt dot de
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-cygwin


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


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

* [Bug fortran/17568] ISHFT intrinsic: bogus overflow error
  2004-09-20 12:23 [Bug fortran/17568] New: ISHFT intrinsic: bogus overflow error anlauf at hep dot tu-darmstadt dot de
@ 2004-09-20 13:09 ` pinskia at gcc dot gnu dot org
  2004-10-02 19:37 ` tobi at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-20 13:09 UTC (permalink / raw)
  To: gcc-bugs


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

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-09-20 13:09:34
               date|                            |


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


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

* [Bug fortran/17568] ISHFT intrinsic: bogus overflow error
  2004-09-20 12:23 [Bug fortran/17568] New: ISHFT intrinsic: bogus overflow error anlauf at hep dot tu-darmstadt dot de
  2004-09-20 13:09 ` [Bug fortran/17568] " pinskia at gcc dot gnu dot org
@ 2004-10-02 19:37 ` tobi at gcc dot gnu dot org
  2004-10-02 19:42 ` tobi at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-10-02 19:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2004-10-02 19:37 -------
Patch here: http://gcc.gnu.org/ml/fortran/2004-10/msg00005.html

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch, rejects-valid


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


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

* [Bug fortran/17568] ISHFT intrinsic: bogus overflow error
  2004-09-20 12:23 [Bug fortran/17568] New: ISHFT intrinsic: bogus overflow error anlauf at hep dot tu-darmstadt dot de
  2004-09-20 13:09 ` [Bug fortran/17568] " pinskia at gcc dot gnu dot org
  2004-10-02 19:37 ` tobi at gcc dot gnu dot org
@ 2004-10-02 19:42 ` tobi at gcc dot gnu dot org
  2004-10-06 16:21 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-10-02 19:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2004-10-02 19:42 -------
Wrong. Patch here: http://gcc.gnu.org/ml/fortran/2004-10/msg00006.html

-- 


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


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

* [Bug fortran/17568] ISHFT intrinsic: bogus overflow error
  2004-09-20 12:23 [Bug fortran/17568] New: ISHFT intrinsic: bogus overflow error anlauf at hep dot tu-darmstadt dot de
                   ` (2 preceding siblings ...)
  2004-10-02 19:42 ` tobi at gcc dot gnu dot org
@ 2004-10-06 16:21 ` cvs-commit at gcc dot gnu dot org
  2004-10-06 16:27 ` tobi at gcc dot gnu dot org
  2004-10-06 17:03 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-06 16:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-10-06 16:21 -------
Subject: Bug 17568

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	tobi@gcc.gnu.org	2004-10-06 16:21:42

Modified files:
	gcc/fortran    : ChangeLog simplify.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gfortran.dg: ishft.f90 

Log message:
	fortran/
	PR fortran/17568
	* simplify.c (twos_complement): New function.
	(gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
	
	testsuite/
	PR fortran/17568
	* gfortran.dg/ishft.f90: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.227&r2=1.228
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/simplify.c.diff?cvsroot=gcc&r1=1.12&r2=1.13
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4391&r2=1.4392
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/ishft.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug fortran/17568] ISHFT intrinsic: bogus overflow error
  2004-09-20 12:23 [Bug fortran/17568] New: ISHFT intrinsic: bogus overflow error anlauf at hep dot tu-darmstadt dot de
                   ` (3 preceding siblings ...)
  2004-10-06 16:21 ` cvs-commit at gcc dot gnu dot org
@ 2004-10-06 16:27 ` tobi at gcc dot gnu dot org
  2004-10-06 17:03 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-10-06 16:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2004-10-06 16:27 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.0


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


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

* [Bug fortran/17568] ISHFT intrinsic: bogus overflow error
  2004-09-20 12:23 [Bug fortran/17568] New: ISHFT intrinsic: bogus overflow error anlauf at hep dot tu-darmstadt dot de
                   ` (4 preceding siblings ...)
  2004-10-06 16:27 ` tobi at gcc dot gnu dot org
@ 2004-10-06 17:03 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-06 17:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-06 17:03 -------
CLosing as missed to closed.

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


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


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

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

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-20 12:23 [Bug fortran/17568] New: ISHFT intrinsic: bogus overflow error anlauf at hep dot tu-darmstadt dot de
2004-09-20 13:09 ` [Bug fortran/17568] " pinskia at gcc dot gnu dot org
2004-10-02 19:37 ` tobi at gcc dot gnu dot org
2004-10-02 19:42 ` tobi at gcc dot gnu dot org
2004-10-06 16:21 ` cvs-commit at gcc dot gnu dot org
2004-10-06 16:27 ` tobi at gcc dot gnu dot org
2004-10-06 17:03 ` 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).