public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/33592] New: FAIL: gfortran.dg/array_constructor_11.f90 -O1 execution test
@ 2007-09-29 18:48 danglin at gcc dot gnu dot org
2007-09-29 19:00 ` [Bug target/33592] " rguenth at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: danglin at gcc dot gnu dot org @ 2007-09-29 18:48 UTC (permalink / raw)
To: gcc-bugs
Executing on host: /test/gnu/gcc/objdir/gcc/testsuite/gfortran/../../gfortran
-B
/test/gnu/gcc/objdir/gcc/testsuite/gfortran/../../
/test/gnu/gcc/gcc/gcc/testsui
te/gfortran.dg/array_constructor_11.f90 -O0 -pedantic-errors
-L/test/gnu/gc
c/objdir/hppa64-hp-hpux11.11/./libgfortran/.libs
-L/test/gnu/gcc/objdir/hppa64-h
p-hpux11.11/./libgfortran/.libs
-L/test/gnu/gcc/objdir/hppa64-hp-hpux11.11/./lib
iberty -lm -o ./array_constructor_11.exe (timeout = 300)
PASS: gfortran.dg/array_constructor_11.f90 -O0 (test for excess errors)
Setting LD_LIBRARY_PATH to
.:/test/gnu/gcc/objdir/hppa64-hp-hpux11.11/./libgfort
ran/.libs:/test/gnu/gcc/objdir/hppa64-hp-hpux11.11/./libgfortran/.libs:/test/gnu
/gcc/objdir/gcc:.:/test/gnu/gcc/objdir/hppa64-hp-hpux11.11/./libgfortran/.libs:/
test/gnu/gcc/objdir/hppa64-hp-hpux11.11/./libgfortran/.libs:/test/gnu/gcc/objdir
/gcc
Operating system error: Not a typewriter
Out of memory
FAIL: gfortran.dg/array_constructor_11.f90 -O0 execution test
Simplified test:
! Like array_constructor_6.f90, but check iterators with non-default stride,
! including combinations which lead to zero-length vectors.
! { dg-do run }
program main
implicit none
call build (77)
contains
subroutine build (order)
integer :: order, i, j
! Triggers compile-time iterator calculations in trans-array.c
call test (1, 0, 3, (/ (i, i = 1, 0, 3), (i, i = order, 0, 1) /))
end subroutine build
subroutine test (from, to, step, values)
integer, dimension (:) :: values
integer :: from, to, step, last, i
last = 0
do i = from, to, step
last = last + 1
if (values (last) .ne. i) call abort
end do
if (size (values, dim = 1) .ne. last) call abort
end subroutine test
end program main
--
Summary: FAIL: gfortran.dg/array_constructor_11.f90 -O1
execution test
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: danglin at gcc dot gnu dot org
GCC build triplet: hppa*-*-hpux*
GCC host triplet: hppa*-*-hpux*
GCC target triplet: hppa*-*-hpux*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33592
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/33592] FAIL: gfortran.dg/array_constructor_11.f90 -O1 execution test
2007-09-29 18:48 [Bug target/33592] New: FAIL: gfortran.dg/array_constructor_11.f90 -O1 execution test danglin at gcc dot gnu dot org
@ 2007-09-29 19:00 ` rguenth at gcc dot gnu dot org
2007-09-29 20:18 ` danglin at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-09-29 19:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2007-09-29 19:00 -------
Operating system error: Not a typewriter
Out of memory
uhm, this doesn't make too much sense. Can you debug this?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33592
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/33592] FAIL: gfortran.dg/array_constructor_11.f90 -O1 execution test
2007-09-29 18:48 [Bug target/33592] New: FAIL: gfortran.dg/array_constructor_11.f90 -O1 execution test danglin at gcc dot gnu dot org
2007-09-29 19:00 ` [Bug target/33592] " rguenth at gcc dot gnu dot org
@ 2007-09-29 20:18 ` danglin at gcc dot gnu dot org
2007-11-09 16:07 ` [Bug fortran/33592] " fxcoudert at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: danglin at gcc dot gnu dot org @ 2007-09-29 20:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from danglin at gcc dot gnu dot org 2007-09-29 20:18 -------
realloc is called with a NULL pointer and 0 size.
realloc (0, 0) returns NULL. This causes _gfortran_os_error
to get called and the above error to get printed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33592
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/33592] FAIL: gfortran.dg/array_constructor_11.f90 -O1 execution test
2007-09-29 18:48 [Bug target/33592] New: FAIL: gfortran.dg/array_constructor_11.f90 -O1 execution test danglin at gcc dot gnu dot org
2007-09-29 19:00 ` [Bug target/33592] " rguenth at gcc dot gnu dot org
2007-09-29 20:18 ` danglin at gcc dot gnu dot org
@ 2007-11-09 16:07 ` fxcoudert at gcc dot gnu dot org
2007-11-09 16:45 ` dave at hiauly1 dot hia dot nrc dot ca
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-11-09 16:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from fxcoudert at gcc dot gnu dot org 2007-11-09 16:07 -------
My mistake. This comes from a typo in trans.c (a EQ_EXPR instead of an
NE_EXPR). Could you test this patch?
Index: trans.c
===================================================================
--- trans.c (revision 129869)
+++ trans.c (working copy)
@@ -829,19 +829,19 @@ internal_realloc (void *mem, size_t size
{
if (size < 0)
runtime_error ("Attempt to allocate a negative amount of memory.");
- mem = realloc (mem, size);
- if (!mem && size != 0)
+ res = realloc (mem, size);
+ if (!res && size != 0)
_gfortran_os_error ("Out of memory");
if (size == 0)
return NULL;
- return mem;
+ return res;
} */
tree
gfc_call_realloc (stmtblock_t * block, tree mem, tree size)
{
- tree msg, res, negative, zero, null_result, tmp;
+ tree msg, res, negative, nonzero, zero, null_result, tmp;
tree type = TREE_TYPE (mem);
size = gfc_evaluate_now (size, block);
@@ -868,10 +868,10 @@ gfc_call_realloc (stmtblock_t * block, t
gfc_add_modify_expr (block, res, fold_convert (type, tmp));
null_result = fold_build2 (EQ_EXPR, boolean_type_node, res,
build_int_cst (pvoid_type_node, 0));
- zero = fold_build2 (EQ_EXPR, boolean_type_node, size,
- build_int_cst (size_type_node, 0));
+ nonzero = fold_build2 (NE_EXPR, boolean_type_node, size,
+ build_int_cst (size_type_node, 0));
null_result = fold_build2 (TRUTH_AND_EXPR, boolean_type_node, null_result,
- zero);
+ nonzero);
msg = gfc_build_addr_expr (pchar_type_node,
gfc_build_cstring_const ("Out of memory"));
tmp = fold_build3 (COND_EXPR, void_type_node, null_result,
@@ -881,6 +881,7 @@ gfc_call_realloc (stmtblock_t * block, t
/* if (size == 0) then the result is NULL. */
tmp = fold_build2 (MODIFY_EXPR, type, res, build_int_cst (type, 0));
+ zero = fold_build1 (TRUTH_NOT_EXPR, boolean_type_node, nonzero);
tmp = fold_build3 (COND_EXPR, void_type_node, zero, tmp,
build_empty_stmt ());
gfc_add_expr_to_block (block, tmp);
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |fxcoudert at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Component|target |fortran
Ever Confirmed|0 |1
Keywords| |wrong-code
Known to fail| |4.3.0
Last reconfirmed|0000-00-00 00:00:00 |2007-11-09 16:07:17
date| |
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33592
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/33592] FAIL: gfortran.dg/array_constructor_11.f90 -O1 execution test
2007-09-29 18:48 [Bug target/33592] New: FAIL: gfortran.dg/array_constructor_11.f90 -O1 execution test danglin at gcc dot gnu dot org
` (2 preceding siblings ...)
2007-11-09 16:07 ` [Bug fortran/33592] " fxcoudert at gcc dot gnu dot org
@ 2007-11-09 16:45 ` dave at hiauly1 dot hia dot nrc dot ca
2007-11-10 17:49 ` dave at hiauly1 dot hia dot nrc dot ca
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2007-11-09 16:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from dave at hiauly1 dot hia dot nrc dot ca 2007-11-09 16:45 -------
Subject: Re: FAIL: gfortran.dg/array_constructor_11.f90 -O1 execution test
> Could you test this patch?
Yes, tonight. Thanks.
Dave
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33592
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/33592] FAIL: gfortran.dg/array_constructor_11.f90 -O1 execution test
2007-09-29 18:48 [Bug target/33592] New: FAIL: gfortran.dg/array_constructor_11.f90 -O1 execution test danglin at gcc dot gnu dot org
` (3 preceding siblings ...)
2007-11-09 16:45 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2007-11-10 17:49 ` dave at hiauly1 dot hia dot nrc dot ca
2007-11-10 18:02 ` fxcoudert at gcc dot gnu dot org
2007-11-10 18:04 ` fxcoudert at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2007-11-10 17:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from dave at hiauly1 dot hia dot nrc dot ca 2007-11-10 17:49 -------
Subject: Re: FAIL: gfortran.dg/array_constructor_11.f90 -O1 execution test
> My mistake. This comes from a typo in trans.c (a EQ_EXPR instead of an
> NE_EXPR). Could you test this patch?
Works for me.
Dave
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33592
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/33592] FAIL: gfortran.dg/array_constructor_11.f90 -O1 execution test
2007-09-29 18:48 [Bug target/33592] New: FAIL: gfortran.dg/array_constructor_11.f90 -O1 execution test danglin at gcc dot gnu dot org
` (4 preceding siblings ...)
2007-11-10 17:49 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2007-11-10 18:02 ` fxcoudert at gcc dot gnu dot org
2007-11-10 18:04 ` fxcoudert at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-11-10 18:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from fxcoudert at gcc dot gnu dot org 2007-11-10 18:02 -------
Subject: Bug 33592
Author: fxcoudert
Date: Sat Nov 10 18:02:18 2007
New Revision: 130072
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130072
Log:
PR fortran/33592
* trans.c (gfc_call_realloc): Fix the logic and rename variables.
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33592
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/33592] FAIL: gfortran.dg/array_constructor_11.f90 -O1 execution test
2007-09-29 18:48 [Bug target/33592] New: FAIL: gfortran.dg/array_constructor_11.f90 -O1 execution test danglin at gcc dot gnu dot org
` (5 preceding siblings ...)
2007-11-10 18:02 ` fxcoudert at gcc dot gnu dot org
@ 2007-11-10 18:04 ` fxcoudert at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-11-10 18:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from fxcoudert at gcc dot gnu dot org 2007-11-10 18:04 -------
Problem fixed. Thanks for investigating this, Dave!
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33592
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-11-10 18:04 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-29 18:48 [Bug target/33592] New: FAIL: gfortran.dg/array_constructor_11.f90 -O1 execution test danglin at gcc dot gnu dot org
2007-09-29 19:00 ` [Bug target/33592] " rguenth at gcc dot gnu dot org
2007-09-29 20:18 ` danglin at gcc dot gnu dot org
2007-11-09 16:07 ` [Bug fortran/33592] " fxcoudert at gcc dot gnu dot org
2007-11-09 16:45 ` dave at hiauly1 dot hia dot nrc dot ca
2007-11-10 17:49 ` dave at hiauly1 dot hia dot nrc dot ca
2007-11-10 18:02 ` fxcoudert at gcc dot gnu dot org
2007-11-10 18:04 ` fxcoudert 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).