[Bug libfortran/48925] New: Code cleanup in write_float.def

2011-05-07 Thread thenlich at users dot sourceforge.net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48925

   Summary: Code cleanup in write_float.def
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: libfortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: thenl...@users.sourceforge.net


For improvement in code quality and possible future modifications, I suggest to
separate the steps "digit generation" and "number formatting" into separate
functions.

1. There should be a function "Digit generation".
Input:
- a floting-point number (e.g. -.123456789E+12)
- the rounding mode (up/down etc.)
- mode: fixed-point (F editing), or floating-point (E/ES/G), or engineering
(EN) 
- number of significant digits (floating-point), number of decimal digits (F)

Output:
- a string with the digits of the rounded significand (e.g. "123457")
- an integer exponent (e.g. 12), or position of the decimal separator
- the sign flag (- or +)

2. There should be a function "number formatting"
Input:
- s.a. Output
- the edit descriptor (F/E/G...)
- Field width w and number of requested digits d

Output:
- A buffer with the formatted number (e.g. "   +1.23457E+011")

Function 2 is independent of the floating-point precision, so we don't need it
four times for all the different real kinds, only one time.


[Bug other/33426] Support of #pragma ivdep

2011-05-07 Thread gjunk at sapience dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33426

--- Comment #11 from gene  2011-05-07 12:15:22 UTC 
---
Any update on this ?


[Bug target/48529] [x32] Testsuite failures

2011-05-07 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48529

--- Comment #1 from H.J. Lu  2011-05-07 13:18:05 
UTC ---
Also

FAIL: g++.dg/torture/pr48661.C  -O1  execution test
FAIL: g++.dg/torture/pr48661.C  -O2  execution test
FAIL: g++.dg/torture/pr48661.C  -O2 -flto  execution test
FAIL: g++.dg/torture/pr48661.C  -O2 -flto -flto-partition=none  execution test
FAIL: g++.dg/torture/pr48661.C  -O3 -fomit-frame-pointer  execution test
FAIL: g++.dg/torture/pr48661.C  -O3 -g  execution test
FAIL: g++.dg/torture/pr48661.C  -Os  execution test


[Bug middle-end/48905] [4.7 Regression] STORAGE_ERROR : stack overflow (or erroneous memory access) compiling namet.adb

2011-05-07 Thread dave at hiauly1 dot hia.nrc.ca
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48905

--- Comment #3 from dave at hiauly1 dot hia.nrc.ca 2011-05-07 14:46:56 UTC ---
On Sat, 07 May 2011, danglin at gcc dot gnu.org wrote:

> Introduced in revision 173428.  Testing "cris-elf" fix.

The attached patch fixes this PR.  It was derived from the
change posted here and Eric's subsequent comment:
http://gcc.gnu.org/ml/gcc-patches/2011-05/msg00491.html

Dave


[Bug fortran/48926] gfortran.dg/coarray/image_index_1.f90 -fcoarray=single -O2 (test for excess errors)

2011-05-07 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48926

--- Comment #1 from Jack Howarth  2011-05-07 
16:05:56 UTC ---
Also possibly related are the failures...

FAIL: gfortran.dg/coarray_10.f90  -O  (test for excess errors)
Excess errors:
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray_10.f90:11:34:
Error: The number of array elements of the SUB argument to IMAGE_INDEX at (1)
shall be 1 (corank) not 4
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray_10.f90:12:34:
Error: The number of array elements of the SUB argument to IMAGE_INDEX at (1)
shall be 1 (corank) not 4
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray_10.f90:13:34:
Error: The number of array elements of the SUB argument to IMAGE_INDEX at (1)
shall be 1 (corank) not 4
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray_10.f90:14:34:
Error: The number of array elements of the SUB argument to IMAGE_INDEX at (1)
shall be 1 (corank) not 3
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray_10.f90:15:34:
Error: The number of array elements of the SUB argument to IMAGE_INDEX at (1)
shall be 1 (corank) not 5

FAIL: gfortran.dg/coarray_13.f90  -O0  (test for excess errors)
Excess errors:
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray_13.f90:121:12:
Error: Shapes for operands at (1) and (2) are not conformable
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray_13.f90:122:12:
Error: Shapes for operands at (1) and (2) are not conformable
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray_13.f90:123:12:
Error: Shapes for operands at (1) and (2) are not conformable
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray_13.f90:99:12:
Error: Shapes for operands at (1) and (2) are not conformable
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray_13.f90:100:12:
Error: Shapes for operands at (1) and (2) are not conformable
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray_13.f90:101:12:
Error: Shapes for operands at (1) and (2) are not conformable
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray_13.f90:59:12:
Error: Shapes for operands at (1) and (2) are not conformable
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray_13.f90:60:12:
Error: Shapes for operands at (1) and (2) are not conformable
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray_13.f90:61:12:
Error: Shapes for operands at (1) and (2) are not conformable
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray_13.f90:38:12:
Error: Shapes for operands at (1) and (2) are not conformable
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray_13.f90:39:12:
Error: Shapes for operands at (1) and (2) are not conformable
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray_13.f90:40:12:
Error: Shapes for operands at (1) and (2) are not conformable


FAIL: gfortran.dg/coarray_16.f90  -O0  (test for excess errors)
Excess errors:
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray_16.f90:85:26:
Error: The number of array elements of the SUB argument to IMAGE_INDEX at (1)
shall be 1 (corank) not 3
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray_16.f90:86:26:
Error: The number of array elements of the SUB argument to IMAGE_INDEX at (1)
shall be 1 (corank) not 2
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray_16.f90:91:26:
Error: The number of array elements of the SUB argument to IMAGE_INDEX at (1)
shall be 1 (corank) not 3
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray_16.f90:92:26:
Error: The number of array elements of the SUB argument to IMAGE_INDEX at (1)
shall be 1 (corank) not 2
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray_16.f90:30:24:
Error: The number of array elements of the SUB argument to IMAGE_INDEX at (1)
shall be 1 (corank) not 3
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray_16.f90:31:24:
Error: The number of array elements of the SUB argument to IMAGE_INDEX at (1)
shall be 1 (corank) not 2
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray_16.f90:36:24:
Error: The number of array elements of the SUB argument to IMAGE_INDEX at (1)
shall be 1 (corank) not 3
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray_16.f90:37:24:
Error: The number of array elements of the SUB argument to IMAGE_INDEX at (1

[Bug fortran/48926] New: gfortran.dg/coarray/image_index_1.f90 -fcoarray=single -O2 (test for excess errors)

2011-05-07 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48926

   Summary: gfortran.dg/coarray/image_index_1.f90 -fcoarray=single
 -O2  (test for excess errors)
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: howa...@nitro.med.uc.edu


At r173533 with or without
http://gcc.gnu.org/ml/gcc-patches/2011-05/msg00566.html applied, the following
new fortran testsuite regressions occur on x86_64-apple-darwin10...

WARNING: gfortran.dg/coarray/image_index_1.f90 -fcoarray=single  -O2 
compilation failed to produce executable
FAIL: gfortran.dg/coarray/image_index_1.f90 -fcoarray=lib  -O2  -lcaf_single
(test for excess errors)
WARNING: gfortran.dg/coarray/image_index_1.f90 -fcoarray=lib  -O2  -lcaf_single
compilation failed to produce executable
FAIL: gfortran.dg/coarray/image_index_2.f90 -fcoarray=single  -O2  (test for
excess errors)
WARNING: gfortran.dg/coarray/image_index_2.f90 -fcoarray=single  -O2 
compilation failed to produce executable
FAIL: gfortran.dg/coarray/image_index_2.f90 -fcoarray=lib  -O2  -lcaf_single
(test for excess errors)
WARNING: gfortran.dg/coarray/image_index_2.f90 -fcoarray=lib  -O2  -lcaf_single
compilation failed to produce executable
FAIL: gfortran.dg/coarray/this_image_1.f90 -fcoarray=single  -O2  (test for
excess errors)
WARNING: gfortran.dg/coarray/this_image_1.f90 -fcoarray=single  -O2 
compilation failed to produce executable
FAIL: gfortran.dg/coarray/this_image_1.f90 -fcoarray=lib  -O2  -lcaf_single
(test for excess errors)
WARNING: gfortran.dg/coarray/this_image_1.f90 -fcoarray=lib  -O2  -lcaf_single
compilation failed to produce executable
FAIL: gfortran.dg/coarray/this_image_2.f90 -fcoarray=single  -O2  (test for
excess errors)
WARNING: gfortran.dg/coarray/this_image_2.f90 -fcoarray=single  -O2 
compilation failed to produce executable
FAIL: gfortran.dg/coarray/this_image_2.f90 -fcoarray=lib  -O2  -lcaf_single
(test for excess errors)
WARNING: gfortran.dg/coarray/this_image_2.f90 -fcoarray=lib  -O2  -lcaf_single
compilation failed to produce executable

these are of the form...

Executing on host:
/sw/src/fink.build/gcc47-4.7.0-1000/darwin_objdir/gcc/testsuite/gfortran/../../gfortran
-B/sw/src/fink.build/gcc47-4.7.0-1000/darwin_objdir/gcc/testsuite/gfortran/../../
-B/sw/src/fink.build/gcc47-4.7.0-1000/darwin_objdir/x86_64-apple-darwin10.7.0/i386/libgfortran/
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray/image_index_1.f90
 -fcoarray=single  -O2   
-B/sw/src/fink.build/gcc47-4.7.0-1000/darwin_objdir/x86_64-apple-darwin10.7.0/i386/libgfortran/.libs
-L/sw/src/fink.build/gcc47-4.7.0-1000/darwin_objdir/x86_64-apple-darwin10.7.0/i386/libgfortran/.libs
-L/sw/src/fink.build/gcc47-4.7.0-1000/darwin_objdir/x86_64-apple-darwin10.7.0/i386/libgfortran/.libs
-B/sw/src/fink.build/gcc47-4.7.0-1000/darwin_objdir/x86_64-apple-darwin10.7.0/i386/libquadmath/.libs
-L/sw/src/fink.build/gcc47-4.7.0-1000/darwin_objdir/x86_64-apple-darwin10.7.0/i386/libquadmath/.libs
-L/sw/src/fink.build/gcc47-4.7.0-1000/darwin_objdir/x86_64-apple-darwin10.7.0/i386/libquadmath/.libs
-L/sw/src/fink.build/gcc47-4.7.0-1000/darwin_objdir/x86_64-apple-darwin10.7.0/i386/libiberty
 -lm   -m32 -o ./image_index_1.exe(timeout = 300)
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray/image_index_1.f90:84.26:

  index1 = image_index(a, [3, -4, 88] )
  1
Error: The number of array elements of the SUB argument to IMAGE_INDEX at (1)
shall be 1 (corank) not 3
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray/image_index_1.f90:85.26:

  index2 = image_index(b, [-1, 0] )
  1
Error: The number of array elements of the SUB argument to IMAGE_INDEX at (1)
shall be 1 (corank) not 2
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray/image_index_1.f90:90.26:

  index1 = image_index(a, [3, -3, 88] )
  1
Error: The number of array elements of the SUB argument to IMAGE_INDEX at (1)
shall be 1 (corank) not 3
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray/image_index_1.f90:91.26:

  index2 = image_index(b, [0, 0] )
  1
Error: The number of array elements of the SUB argument to IMAGE_INDEX at (1)
shall be 1 (corank) not 2
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray/image_index_1.f90:29.24:

index1 = image_index(a, [3, -4, 88] )
1
Error: The number of array elements of the SUB argument to IMAGE_INDEX at (1)
shall be 1 (corank) not 3
/sw/src/fink.build/gcc47-4.7.0-1000/gcc-4.7-20110507/gcc/testsuite/gfortran.dg/coarray/image_index_1.f90:30.24:

index2 = image_index(b, [-1, 0] )
1
Error: The

[Bug bootstrap/48679] [4.7 regression] bootstrap comparison failures on m68k-linux

2011-05-07 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48679

--- Comment #5 from Mikael Pettersson  2011-05-07 
16:25:34 UTC ---
It's calls.c that gets miscompiled.  If stage2 cc1 is relinked with calls.o
from stage1 then it generates the same code for alloca.c as stage1 does.  If
stage1 cc1 is relinked with calls.o from stage2 then it generates the same code
for alloca.c as original stage2 and stage3 do.


[Bug fortran/48889] f951: internal compiler error: in gfc_is_constant_expr, at fortran/expr.c:906

2011-05-07 Thread david.ham at imperial dot ac.uk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48889

--- Comment #2 from David Ham  2011-05-07 
18:37:22 UTC ---
Created attachment 24205
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24205
Small test exhibiting the problem.

I am one of the fluidity development team. 

This is a very cut down source which exhibits the problem. It produces the
following compiler output:

dham@hex foo > gfortran-4.6  -c foo.f90 
foo.f90:103:0: internal compiler error: in gfc_is_constant_expr, at
fortran/expr.c:906
Please submit a full bug report,
with preprocessed source if appropriate.

>From the experience of cutting down the source to this test, I think it's
something to do with the generic interface "size".


[Bug tree-optimization/48837] [4.4/4.5/4.6/4.6 Regression] Wrong optimization of recursive function calls

2011-05-07 Thread rakdver at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48837

--- Comment #9 from Zdenek Dvorak  2011-05-07 
19:43:21 UTC ---
Author: rakdver
Date: Sat May  7 19:43:18 2011
New Revision: 173534

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173534
Log:
PR tree-optimization/48837
* tree-tailcall.c (tree_optimize_tail_calls_1): Do not mark tailcalls
when accumulator transformation is performed.

* gcc.dg/pr48837.c: New testcase.


Added:
trunk/gcc/testsuite/gcc.dg/pr48837.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-tailcall.c