public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/44346]  New: gfortran accepts illegal arguments to intrinsics
@ 2010-05-31 16:16 zeccav at gmail dot com
  2010-05-31 16:29 ` [Bug fortran/44346] " kargl at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: zeccav at gmail dot com @ 2010-05-31 16:16 UTC (permalink / raw)
  To: gcc-bugs

gfortran should not accept the following:

character s,ss(1),pad(1),order(1)
      integer nn(7)
c gfortran should complain that POS and LEN are negative
      print *,ibits(i,-1,-1)
c POS+LEN>BIT_SIZE(i)
      print *,ibits(i,100,100)
c 30+3>32
      call mvbits(n,30,3,n,1)
c 31+2>32
      call mvbits(n,30,2,n,31)
c LEN negative
      call mvbits(n,30,-2,n,30)
c TOPOS negative
      call mvbits(n,30,2,n,-3)
c FROMPOS negative
      call mvbits(n,-1,2,n,3)
      end

Best regards
Vittorio Zecca


-- 
           Summary: gfortran accepts illegal arguments to intrinsics
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zeccav at gmail dot com
  GCC host triplet: x86_64-unknown-linux-gnu


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


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

* [Bug fortran/44346] gfortran accepts illegal arguments to intrinsics
  2010-05-31 16:16 [Bug fortran/44346] New: gfortran accepts illegal arguments to intrinsics zeccav at gmail dot com
@ 2010-05-31 16:29 ` kargl at gcc dot gnu dot org
  2010-05-31 17:22 ` kargl at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu dot org @ 2010-05-31 16:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from kargl at gcc dot gnu dot org  2010-05-31 16:29 -------
Thanks for the bug report.  Technically, the prohibition of
nonnegative is on the programmer, and as such the code is
illegal.  gfortran can do anything it wants with the program
including starting world war iii.  OTOH, this appears to be
a quality-of-implementation issue, and if gfortran can diagnosis
the problem, and error should be emitted.


-- 


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


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

* [Bug fortran/44346] gfortran accepts illegal arguments to intrinsics
  2010-05-31 16:16 [Bug fortran/44346] New: gfortran accepts illegal arguments to intrinsics zeccav at gmail dot com
  2010-05-31 16:29 ` [Bug fortran/44346] " kargl at gcc dot gnu dot org
@ 2010-05-31 17:22 ` kargl at gcc dot gnu dot org
  2010-05-31 17:51 ` kargl at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu dot org @ 2010-05-31 17:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from kargl at gcc dot gnu dot org  2010-05-31 17:22 -------
I have a patch for the IBITS() portion of the problem.


-- 

kargl at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |kargl at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-05-31 17:22:21
               date|                            |


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


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

* [Bug fortran/44346] gfortran accepts illegal arguments to intrinsics
  2010-05-31 16:16 [Bug fortran/44346] New: gfortran accepts illegal arguments to intrinsics zeccav at gmail dot com
  2010-05-31 16:29 ` [Bug fortran/44346] " kargl at gcc dot gnu dot org
  2010-05-31 17:22 ` kargl at gcc dot gnu dot org
@ 2010-05-31 17:51 ` kargl at gcc dot gnu dot org
  2010-06-01  7:46 ` burnus at gcc dot gnu dot org
  2010-06-09 16:39 ` kargl at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu dot org @ 2010-05-31 17:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from kargl at gcc dot gnu dot org  2010-05-31 17:51 -------
I have a complete patch with the mvbits checking done.


-- 


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


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

* [Bug fortran/44346] gfortran accepts illegal arguments to intrinsics
  2010-05-31 16:16 [Bug fortran/44346] New: gfortran accepts illegal arguments to intrinsics zeccav at gmail dot com
                   ` (2 preceding siblings ...)
  2010-05-31 17:51 ` kargl at gcc dot gnu dot org
@ 2010-06-01  7:46 ` burnus at gcc dot gnu dot org
  2010-06-09 16:39 ` kargl at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-06-01  7:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from burnus at gcc dot gnu dot org  2010-06-01 07:45 -------
Steve's patch: http://gcc.gnu.org/ml/fortran/2010-06/msg00002.html


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic


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


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

* [Bug fortran/44346] gfortran accepts illegal arguments to intrinsics
  2010-05-31 16:16 [Bug fortran/44346] New: gfortran accepts illegal arguments to intrinsics zeccav at gmail dot com
                   ` (3 preceding siblings ...)
  2010-06-01  7:46 ` burnus at gcc dot gnu dot org
@ 2010-06-09 16:39 ` kargl at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu dot org @ 2010-06-09 16:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from kargl at gcc dot gnu dot org  2010-06-09 16:39 -------
Patch has been committed to 4.4, 4.5, and trunk.
Closing.


-- 

kargl at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2010-06-09 16:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-31 16:16 [Bug fortran/44346] New: gfortran accepts illegal arguments to intrinsics zeccav at gmail dot com
2010-05-31 16:29 ` [Bug fortran/44346] " kargl at gcc dot gnu dot org
2010-05-31 17:22 ` kargl at gcc dot gnu dot org
2010-05-31 17:51 ` kargl at gcc dot gnu dot org
2010-06-01  7:46 ` burnus at gcc dot gnu dot org
2010-06-09 16:39 ` kargl 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).