public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/38887] New: run-time abort for MVBITS with run-time zero sized array arguments
@ 2009-01-16 21:11 dick dot hendrickson at gmail dot com
2009-01-16 21:48 ` [Bug fortran/38887] [4.4 Regression] " burnus at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: dick dot hendrickson at gmail dot com @ 2009-01-16 21:11 UTC (permalink / raw)
To: gcc-bugs
The following program gives a run-time abort. If either of the array arguments
to MVBITS has an explicit (ie (5,1) or (6,1) ) zero size, the program does not
abort.
It aborts differently on Windows, depending on how it is run.
Dick Hendrickson
program try_ya0013
! fails on Windows XP
! gcc version 4.4.0 20081219 (experimental) [trunk revision 142842] (GCC)
integer ida(9)
call ya0013(ida,1,5,6)
end
SUBROUTINE YA0013(IDA,nf1,nf5,nf6)
INTEGER IDA(9)
IDA = 1
CALL MVBITS(IDA(NF5:NF1), 0, 1, IDA(NF6:NF1),2)
END SUBROUTINE
C:gfortran>gfortran try_ya0013.f
C:gfortran>a
When run as a simple stand-alone test, an alert box appears. The first part
is:
"a.exe has encountered a problem and needs to close. We are sorry for the
inconvenience."
The box then offers to send a report to Microsoft!
When the subroutine is run as part of a larger program this text message
appears:
"This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information."
and the program terminates.
--
Summary: run-time abort for MVBITS with run-time zero sized array
arguments
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dick dot hendrickson at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38887
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/38887] [4.4 Regression] run-time abort for MVBITS with run-time zero sized array arguments
2009-01-16 21:11 [Bug fortran/38887] New: run-time abort for MVBITS with run-time zero sized array arguments dick dot hendrickson at gmail dot com
@ 2009-01-16 21:48 ` burnus at gcc dot gnu dot org
2009-01-16 22:05 ` jakub at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-01-16 21:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from burnus at gcc dot gnu dot org 2009-01-16 21:48 -------
Confirm. Thanks for reporting.
Backtrace:
#0 0x00002aaaab4a4645 in raise () from /lib64/libc.so.6
#1 0x00002aaaab4a5c33 in abort () from /lib64/libc.so.6
#2 0x00002aaaaad69c00 in *_gfortrani_internal_unpack_4 (d=0x6e11, src=0x6e11)
at /home/tob/projects/gcc/libgfortran/generated/in_unpack_i4.c:63
#3 0x0000000000400ba3 in ya0013 (ida=(1, 1, 1, 1, 1, 1, 1, 1, 1), nf1=1,
nf5=5, nf6=6) at test.f90:12
Working: 4.4.0 20081029 (experimental) [trunk revision 141421]
Failing: 4.4.0 20081103 (experimental) [trunk revision 141544]
(Assuming that my tree was clean back then)
Daniel, you worked on MVBITS for PR 35681 (Rev. 141516). Could you have a look
for this PR and also PR 38883. Thanks!
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |domob at gcc dot gnu dot org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2009-01-16 21:48:38
date| |
Summary|run-time abort for MVBITS |[4.4 Regression] run-time
|with run-time zero sized |abort for MVBITS with run-
|array arguments |time zero sized array
| |arguments
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38887
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/38887] [4.4 Regression] run-time abort for MVBITS with run-time zero sized array arguments
2009-01-16 21:11 [Bug fortran/38887] New: run-time abort for MVBITS with run-time zero sized array arguments dick dot hendrickson at gmail dot com
2009-01-16 21:48 ` [Bug fortran/38887] [4.4 Regression] " burnus at gcc dot gnu dot org
@ 2009-01-16 22:05 ` jakub at gcc dot gnu dot org
2009-01-17 22:20 ` burnus at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-16 22:05 UTC (permalink / raw)
To: gcc-bugs
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38887
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/38887] [4.4 Regression] run-time abort for MVBITS with run-time zero sized array arguments
2009-01-16 21:11 [Bug fortran/38887] New: run-time abort for MVBITS with run-time zero sized array arguments dick dot hendrickson at gmail dot com
2009-01-16 21:48 ` [Bug fortran/38887] [4.4 Regression] " burnus at gcc dot gnu dot org
2009-01-16 22:05 ` jakub at gcc dot gnu dot org
@ 2009-01-17 22:20 ` burnus at gcc dot gnu dot org
2009-01-20 9:44 ` domob at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-01-17 22:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from burnus at gcc dot gnu dot org 2009-01-17 22:20 -------
Created an attachment (id=17130)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17130&action=view)
Difference of the dump
The problem is the call
_gfortran_internal_unpack (&parm.2, D.1572);
since the array has zero extent. The _gfortrani_internal_unpack_4 has the
following check:
61 extent[n] = d->dim[n].ubound + 1 - d->dim[n].lbound;
62 if (extent[n] <= 0)
63 abort ();
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38887
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/38887] [4.4 Regression] run-time abort for MVBITS with run-time zero sized array arguments
2009-01-16 21:11 [Bug fortran/38887] New: run-time abort for MVBITS with run-time zero sized array arguments dick dot hendrickson at gmail dot com
` (2 preceding siblings ...)
2009-01-17 22:20 ` burnus at gcc dot gnu dot org
@ 2009-01-20 9:44 ` domob at gcc dot gnu dot org
2009-01-21 13:35 ` domob at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: domob at gcc dot gnu dot org @ 2009-01-20 9:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from domob at gcc dot gnu dot org 2009-01-20 09:44 -------
I will work on this.
--
domob at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |domob at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2009-01-16 21:48:38 |2009-01-20 09:44:41
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38887
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/38887] [4.4 Regression] run-time abort for MVBITS with run-time zero sized array arguments
2009-01-16 21:11 [Bug fortran/38887] New: run-time abort for MVBITS with run-time zero sized array arguments dick dot hendrickson at gmail dot com
` (3 preceding siblings ...)
2009-01-20 9:44 ` domob at gcc dot gnu dot org
@ 2009-01-21 13:35 ` domob at gcc dot gnu dot org
2009-01-21 13:37 ` domob at gcc dot gnu dot org
2009-01-29 17:44 ` hjl at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: domob at gcc dot gnu dot org @ 2009-01-21 13:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from domob at gcc dot gnu dot org 2009-01-21 13:35 -------
Subject: Bug 38887
Author: domob
Date: Wed Jan 21 13:34:55 2009
New Revision: 143541
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143541
Log:
2009-01-21 Daniel Kraft <d@domob.eu>
* trans-stmt.c (gfc_conv_elemental_dependencies): Cleaned up comment.
2009-01-21 Daniel Kraft <d@domob.eu>
PR fortran/38887
* runtime/in_unpack_generic.c (internal_unpack): Return instead of
abort when called with empty array.
* m4/in_unpack.m4: Ditto.
* generated/in_unpack_i1.c: Regenerated.
* generated/in_unpack_i2.c: Regenerated.
* generated/in_unpack_i4.c: Regenerated.
* generated/in_unpack_i8.c: Regenerated.
* generated/in_unpack_i16.c: Regenerated.
* generated/in_unpack_r4.c: Regenerated.
* generated/in_unpack_r8.c: Regenerated.
* generated/in_unpack_r10.c: Regenerated.
* generated/in_unpack_r16.c: Regenerated.
* generated/in_unpack_c4.c: Regenerated.
* generated/in_unpack_c8.c: Regenerated.
* generated/in_unpack_c10.c: Regenerated.
* generated/in_unpack_c16.c: Regenerated.
2009-01-21 Daniel Kraft <d@domob.eu>
PR fortran/38887
* gfortran.dg/mvbits_5.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/mvbits_5.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-stmt.c
trunk/gcc/testsuite/ChangeLog
trunk/libgfortran/ChangeLog
trunk/libgfortran/generated/in_unpack_c10.c
trunk/libgfortran/generated/in_unpack_c16.c
trunk/libgfortran/generated/in_unpack_c4.c
trunk/libgfortran/generated/in_unpack_c8.c
trunk/libgfortran/generated/in_unpack_i1.c
trunk/libgfortran/generated/in_unpack_i16.c
trunk/libgfortran/generated/in_unpack_i2.c
trunk/libgfortran/generated/in_unpack_i4.c
trunk/libgfortran/generated/in_unpack_i8.c
trunk/libgfortran/generated/in_unpack_r10.c
trunk/libgfortran/generated/in_unpack_r16.c
trunk/libgfortran/generated/in_unpack_r4.c
trunk/libgfortran/generated/in_unpack_r8.c
trunk/libgfortran/m4/in_unpack.m4
trunk/libgfortran/runtime/in_unpack_generic.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38887
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/38887] [4.4 Regression] run-time abort for MVBITS with run-time zero sized array arguments
2009-01-16 21:11 [Bug fortran/38887] New: run-time abort for MVBITS with run-time zero sized array arguments dick dot hendrickson at gmail dot com
` (4 preceding siblings ...)
2009-01-21 13:35 ` domob at gcc dot gnu dot org
@ 2009-01-21 13:37 ` domob at gcc dot gnu dot org
2009-01-29 17:44 ` hjl at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: domob at gcc dot gnu dot org @ 2009-01-21 13:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from domob at gcc dot gnu dot org 2009-01-21 13:37 -------
Fixed on trunk by converting the abort() call in internal_unpack to a return
(this is also what the "real" unpack library call does).
--
domob at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38887
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/38887] [4.4 Regression] run-time abort for MVBITS with run-time zero sized array arguments
2009-01-16 21:11 [Bug fortran/38887] New: run-time abort for MVBITS with run-time zero sized array arguments dick dot hendrickson at gmail dot com
` (5 preceding siblings ...)
2009-01-21 13:37 ` domob at gcc dot gnu dot org
@ 2009-01-29 17:44 ` hjl at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: hjl at gcc dot gnu dot org @ 2009-01-29 17:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from hjl at gcc dot gnu dot org 2009-01-29 17:43 -------
Subject: Bug 38887
Author: hjl
Date: Thu Jan 29 17:43:14 2009
New Revision: 143765
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143765
Log:
2009-01-29 H.J. Lu <hongjiu.lu@intel.com>
2009-01-28 Richard Guenther <rguenther@suse.de>
PR middle-end/38908
* g++.dg/warn/Wuninitialized-2.C: New testcase.
2009-01-27 Daniel Kraft <d@domob.eu>
PR fortran/38883
* gfortran.dg/mvbits_6.f90: New test.
* gfortran.dg/mvbits_7.f90: New test.
* gfortran.dg/mvbits_8.f90: New test.
2009-01-21 Daniel Kraft <d@domob.eu>
PR fortran/38887
* gfortran.dg/mvbits_5.f90: New test.
Added:
branches/gcc-4_3-branch/gcc/testsuite/g++.dg/warn/Wuninitialized-2.C
- copied unchanged from r143764,
trunk/gcc/testsuite/g++.dg/warn/Wuninitialized-2.C
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/mvbits_5.f90
- copied unchanged from r143764,
trunk/gcc/testsuite/gfortran.dg/mvbits_5.f90
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/mvbits_6.f90
- copied unchanged from r143764,
trunk/gcc/testsuite/gfortran.dg/mvbits_6.f90
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/mvbits_7.f90
- copied unchanged from r143764,
trunk/gcc/testsuite/gfortran.dg/mvbits_7.f90
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/mvbits_8.f90
- copied unchanged from r143764,
trunk/gcc/testsuite/gfortran.dg/mvbits_8.f90
Modified:
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38887
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-01-29 17:44 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-16 21:11 [Bug fortran/38887] New: run-time abort for MVBITS with run-time zero sized array arguments dick dot hendrickson at gmail dot com
2009-01-16 21:48 ` [Bug fortran/38887] [4.4 Regression] " burnus at gcc dot gnu dot org
2009-01-16 22:05 ` jakub at gcc dot gnu dot org
2009-01-17 22:20 ` burnus at gcc dot gnu dot org
2009-01-20 9:44 ` domob at gcc dot gnu dot org
2009-01-21 13:35 ` domob at gcc dot gnu dot org
2009-01-21 13:37 ` domob at gcc dot gnu dot org
2009-01-29 17:44 ` hjl 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).