[Bug c/40251] New: Using the -V option makes the compiler to exit with 0 exit code on error

2009-05-26 Thread zoltan at bendor dot com dot au
If a file has errors and gcc gets the -V X.X.X command line option, then the
exit code is 0. The following illustrates it:

[zoltan manocska]~arm-elf-gcc --version
arm-elf-gcc (GCC) 4.4.0
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[zoltan manocska]~echo @  test.c 
[zoltan manocska]~arm-elf-gcc -c test.c
test.c:1: error: stray �...@’ in program
[zoltan manocska]~echo $?
1
[zoltan manocska]~arm-elf-gcc -V 4.4.0 -c test.c
test.c:1: error: stray �...@’ in program
[zoltan manocska]~echo $?   
0
[zoltan manocska]~arm-elf-gcc -V 4.0.2 -c test.c
test.c:1: error: stray �...@’ in program
[zoltan manocska]~echo $?   
0

In a makefile, where a specific compiler is chosen, this bug causes very severe
headaches. I don't know if it's true for all targets, but I tried it with
arm-elf and mips-elf, they both show the same erroneous behaviour. Before the
4.4.0 compiler was installed, the 4.0.2 compiler did not exhibit this bug:

[zoltan manocska]~arm-elf-gcc-4.0.2 -c test.c 
test.c:1: error: stray �...@’ in program
[zoltan manocska]~echo $? 
1
[zoltan manocska]~arm-elf-gcc-4.0.2 -V 4.0.2 -c test.c
test.c:1: error: stray �...@’ in program
[zoltan manocska]~echo $? 
1
[zoltan manocska]~arm-elf-gcc-4.0.2 -V 4.4.0 -c test.c
test.c:1: error: stray �...@’ in program
[zoltan manocska]~echo $? 
1


-- 
   Summary: Using the -V option makes the compiler to exit with 0
exit code on error
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: zoltan at bendor dot com dot au
  GCC host triplet: x86-elf-linux
GCC target triplet: arm-elf-none


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



[Bug middle-end/40252] New: Internal compiler error on samba4 (verify_gimple failed)

2009-05-26 Thread bradh at frogmouth dot net
[br...@conferta source4]$ /opt/gccsvn/bin/gcc -v -save-temps -g
-DDEBUG_PASSWORD -DDEVELOPER -Wall -Wshadow
-Werror-implicit-function-declaration -Wstrict-prototypes -Wpointer-arith
-Wcast-qual -Wcast-align -Wwrite-strings -Wmissing-format-attribute -Wformat=2
-Wdeclaration-after-statement -Wunused-macros -Wno-format-y2k
-Wno-unused-parameter -Iheimdal/../heimdal_build -Iheimdal/lib/hcrypto
-Iheimdal/lib -Iheimdal_build -Iheimdal/lib/roken -Iheimdal/lib/asn1
-Iheimdal/../heimdal_build -Iheimdal/lib/hcrypto/imath
-Iheimdal/../heimdal_build -Iheimdal/lib/asn1 -Iheimdal/../heimdal_build
-Iheimdal/lib/com_err -Iheimdal/../heimdal_build -Iheimdal/lib/roken
-I../lib/socket_wrapper -fPIC -I./include -I. -I./lib -I./../lib/replace
-I./../lib/talloc -I./.. -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H  -c
heimdal/lib/hcrypto/des.c -o heimdal/lib/hcrypto/des.o  
Using built-in specs.   
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-svn/configure --prefix=/opt/gccsvn/ 
Thread model: posix 
gcc version 4.5.0 20090525 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-g' '-DDEBUG_PASSWORD' '-DDEVELOPER'
'-Wall' '-Wshadow' '-Werror-implicit-function-declaration'
'-Wstrict-prototypes' '-Wpointer-arith' '-Wcast-qual' '-Wcast-align'
'-Wwrite-strings' '-Wmissing-format-attribute' '-Wformat=2'
'-Wdeclaration-after-statement' '-Wunused-macros' '-Wno-format-y2k'
'-Wno-unused-parameter' '-Iheimdal/../heimdal_build' '-Iheimdal/lib/hcrypto'
'-Iheimdal/lib' '-Iheimdal_build' '-Iheimdal/lib/roken' '-Iheimdal/lib/asn1'
'-Iheimdal/../heimdal_build' '-Iheimdal/lib/hcrypto/imath'
'-Iheimdal/../heimdal_build' '-Iheimdal/lib/asn1' '-Iheimdal/../heimdal_build'
'-Iheimdal/lib/com_err' '-Iheimdal/../heimdal_build' '-Iheimdal/lib/roken'
'-I../lib/socket_wrapper' '-fPIC' '-I./include' '-I.' '-I./lib'
'-I./../lib/replace' '-I./../lib/talloc' '-I./..' '-D_SAMBA_BUILD_=4'
'-DHAVE_CONFIG_H' '-c' '-o' 'heimdal/lib/hcrypto/des.o' '-mtune=generic'
 /opt/gccsvn/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/cc1 -E -quiet -v
-Iheimdal/../heimdal_build -Iheimdal/lib/hcrypto -Iheimdal/lib -Iheimdal_build
-Iheimdal/lib/roken -Iheimdal/lib/asn1 -Iheimdal/../heimdal_build
-Iheimdal/lib/hcrypto/imath -Iheimdal/../heimdal_build -Iheimdal/lib/asn1
-Iheimdal/../heimdal_build -Iheimdal/lib/com_err -Iheimdal/../heimdal_build
-Iheimdal/lib/roken -I../lib/socket_wrapper -I./include -I. -I./lib
-I./../lib/replace -I./../lib/talloc -I./.. -iprefix
/opt/gccsvn/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.5.0/ -DDEBUG_PASSWORD
-DDEVELOPER -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H heimdal/lib/hcrypto/des.c
-mtune=generic -Wall -Wshadow -Werror-implicit-function-declaration
-Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings
-Wmissing-format-attribute -Wformat=2 -Wdeclaration-after-statement
-Wunused-macros -Wno-format-y2k -Wno-unused-parameter -fPIC -g
-fworking-directory -fpch-preprocess -o des.i   
ignoring nonexistent directory
/opt/gccsvn/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../x86_64-unknown-linux-gnu/include
 
ignoring duplicate directory
/opt/gccsvn/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.5.0/include
 
ignoring duplicate directory
/opt/gccsvn/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.5.0/include-fixed
 
ignoring nonexistent directory
/opt/gccsvn/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../x86_64-unknown-linux-gnu/include
 
ignoring duplicate directory heimdal_build
ignoring duplicate directory heimdal/../heimdal_build 
ignoring duplicate directory heimdal/../heimdal_build 
ignoring duplicate directory heimdal/lib/asn1 
ignoring duplicate directory heimdal/../heimdal_build 
ignoring duplicate directory heimdal/../heimdal_build 
ignoring duplicate directory heimdal/lib/roken
#include ... search starts here:  
#include ... search starts here:  
 heimdal/../heimdal_build   
 heimdal/lib/hcrypto
 heimdal/lib
 heimdal/lib/roken  
 heimdal/lib/asn1   
 heimdal/lib/hcrypto/imath  
 heimdal/lib/com_err
 

[Bug middle-end/40252] Internal compiler error on samba4 (verify_gimple failed)

2009-05-26 Thread bradh at frogmouth dot net


--- Comment #1 from bradh at frogmouth dot net  2009-05-26 06:48 ---
Created an attachment (id=17916)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17916action=view)
.i for bug40252


-- 


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



[Bug c/40253] New: label emitted for debug has no reference?

2009-05-26 Thread marcus at jet dot franken dot de
extracted from Wine

/home/marcus/projects/gcc.trunk/BIN/bin/gcc  -c  -O2 -g  typelib.i -m32
/tmp/cc23hzJL.s: Assembler messages:
/tmp/cc23hzJL.s:299: Error: can't resolve `.LFE8' {*UND* section} - `.Ltext0'
{.text section}


The -m32 (build for x86) is necessary.


-- 
   Summary: label emitted for debug has no reference?
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: marcus at jet dot franken dot de
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: i586-unknown-linux-gnu


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



[Bug c/40253] label emitted for debug has no reference?

2009-05-26 Thread marcus at jet dot franken dot de


--- Comment #1 from marcus at jet dot franken dot de  2009-05-26 07:11 
---
Created an attachment (id=17917)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17917action=view)
typelib.i

gcc -m32 -g -O3 typelib.i


reduced testcase ... further reduction seems to remove the problem :/


-- 


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



[Bug fortran/40246] ICE on invalid SOURCE= using NULLIFY

2009-05-26 Thread burnus at gcc dot gnu dot org


--- Comment #1 from burnus at gcc dot gnu dot org  2009-05-26 08:32 ---
The following patch to gfc_match_nullify fixes it; however, I think one should
additionally add

  gfc_free_expr (new_st.expr1);
  new_st.expr1 = NULL;
  gfc_free_expr (new_st.expr2);
  new_st.expr2 = NULL;

to prevent a memory leak.

--- match.c (revision 147861)
+++ match.c (working copy)
@@ -2418,6 +2470,7 @@ syntax:

 cleanup:
   gfc_free_statements (new_st.next);
+  new_st.next = NULL;
   return MATCH_ERROR;
 }


-- 

burnus at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |burnus at gcc dot gnu dot
   |dot org |org
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2009-05-26 08:32:21
   date||


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



[Bug testsuite/40247] [4.5 Regression] Revision 147848 failed gcc.dg/struct/wo_prof_escape_substr_pointer.c

2009-05-26 Thread rguenth at gcc dot gnu dot org


--- Comment #1 from rguenth at gcc dot gnu dot org  2009-05-26 08:41 ---
It's just optimized to nothing.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
   |dot org |org
 Status|UNCONFIRMED |ASSIGNED
  Component|middle-end  |testsuite
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2009-05-26 08:41:41
   date||
   Target Milestone|--- |4.5.0


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



[Bug middle-end/40244] [4.5 Regression] Revision147829 caused extra failures

2009-05-26 Thread irar at il dot ibm dot com


--- Comment #1 from irar at il dot ibm dot com  2009-05-26 08:58 ---
(In reply to comment #0)
 On Linux/ia64, revision 147829:
 http://gcc.gnu.org/ml/gcc-cvs/2009-05/msg00806.html
 caused:
 FAIL: Matrix4f -O3 compilation from source

Could you please provide some information, it doesn't fail on x86_64...

 FAIL: gcc.dg/vect/bb-slp-10.c scan-tree-dump-times slp unsupported alignment
 in basic block. 1
 FAIL: gcc.dg/vect/bb-slp-4.c scan-tree-dump-times slp basic block vectorized
 using SLP 0

I think they can be fixed as following. Could you please check?

Index: testsuite/gcc.dg/vect/bb-slp-4.c
===
--- testsuite/gcc.dg/vect/bb-slp-4.c(revision 147862)
+++ testsuite/gcc.dg/vect/bb-slp-4.c(working copy)
@@ -18,14 +18,10 @@ main1 ()

   *pout++ = *pin++;
   *pout++ = *pin++;
-  *pout++ = *pin++;
-  *pout++ = *pin++;

   /* Check results.  */
   if (out[0] != in[0]
-  || out[1] != in[1]
-  || out[2] != in[2]
-  || out[3] != in[3])
+  || out[1] != in[1])
 abort();

   return 0;
Index: testsuite/gcc.dg/vect/bb-slp-10.c
===
--- testsuite/gcc.dg/vect/bb-slp-10.c   (revision 147862)
+++ testsuite/gcc.dg/vect/bb-slp-10.c   (working copy)
@@ -14,7 +14,7 @@ main1 (unsigned int x, unsigned int y)
 {
   int i;
   unsigned int *pin = in[0];
-  unsigned int *pout = out[2];
+  unsigned int *pout = out[1];
   unsigned int a0, a1, a2, a3;

   /* Misaligned store.  */
@@ -29,10 +29,10 @@ main1 (unsigned int x, unsigned int y)
   *pout++ = a3 * y;

   /* Check results.  */
-  if (out[2] != (in[0] + 23) * x
-  || out[3] != (in[1] + 142) * y
-  || out[4] != (in[2] + 2) * x
-  || out[5] != (in[3] + 31) * y)
+  if (out[1] != (in[0] + 23) * x
+  || out[2] != (in[1] + 142) * y
+  || out[3] != (in[2] + 2) * x
+  || out[4] != (in[3] + 31) * y)
 abort();

   return 0;

Thanks,
Ira


-- 


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



[Bug fortran/27613] compile fails with Unclassifiable statement error message

2009-05-26 Thread theresa dot adelt at greselius dot net


--- Comment #13 from theresa dot adelt at greselius dot net  2009-05-26 
09:00 ---
Subject: Re:  compile fails with Unclassifiable statement error
 mess


Hello!

Thank you so much for answering.

But I think this is not the problem.
I added the '', but thereupon appeared a syntax error. I think it is because
in FORTRAN you have to use .AND.. So I changed this and now I got the error
with unclassifiable statement again.

[...@sm-pc17-linux Fortran-Kram]$ cat prim.f
program prim
! Testet, ob eine gegebene Zahl prim
integer :: kandidat, teiler, rest
kandidat = 7099
do teiler = 2, kandidat - 1
rest = MOD(kandidat, teiler)
if (rest == 0) THEN
write(*,*)kandidat, ' ist nicht Teiler' .AND.
  teiler, 'ist ein Teiler'
stop
end if
end do
write(*,*)kandidat, 'ist prim.'
stop
end program prim

[...@sm-pc17-linux Fortran-Kram]$ g95 -ffree-form prim.f
In file prim.f:8

write(*,*)kandidat, ' ist nicht Teiler' .AND.
 1
Error: Syntax error in expression at (1)
In file prim.f:9

  teiler, 'ist ein Teiler'
  1
Error: Unclassifiable statement at (1)


Oh, it's a little crazy. Now I recognize, that I've got the syntax error
anyhow. And changing .AND. with  again, I get only the Syntax error:

[...@sm-pc17-linux Fortran-Kram]$ cat prim.f
program prim
! Testet, ob eine gegebene Zahl prim
integer :: kandidat, teiler, rest
kandidat = 7099
do teiler = 2, kandidat - 1
rest = MOD(kandidat, teiler)
if (rest == 0) THEN
write(*,*)kandidat, ' ist nicht Teiler' 
  teiler, 'ist ein Teiler'
stop
end if
end do
write(*,*)kandidat, 'ist prim.'
stop
end program prim

[...@sm-pc17-linux Fortran-Kram]$ g95 -ffree-form prim.f
In file prim.f:9

  teiler, 'ist ein Teiler'
  1
Error: Syntax error in WRITE statement at (1)
[...@sm-pc17-linux Fortran-Kram]$ 


Do you now what I have made wrong.

I am so happy if anybody could help me.


Greetings,

Theresa




 --- Comment #12 from tobi at gcc dot gnu dot org  2009-05-19 15:55 ---
 
 Add an ampersand ()
 
 (In reply to comment #11)
  write(*,*)kandidat, ' ist nicht Teiler' 
here  ^^
 
 and be sure to read the section on continuation lines in your Fortran text.
 
 
 -- 
 
 
 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27613
 
 --- You are receiving this mail because: ---
 You are on the CC list for the bug, or are watching someone who is.


-- 


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



[Bug target/40249] [4.5 Regression]: build breakage with inline heuristics change

2009-05-26 Thread rguenth at gcc dot gnu dot org


--- Comment #4 from rguenth at gcc dot gnu dot org  2009-05-26 09:06 ---
-fno-inline-functions should probably be -fno-inline.  -f[no-]inline-functions
is semantically a no-op (it just tunes some params).


-- 


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



[Bug middle-end/40252] Internal compiler error on samba4 (verify_gimple failed)

2009-05-26 Thread rguenth at gcc dot gnu dot org


--- Comment #2 from rguenth at gcc dot gnu dot org  2009-05-26 09:09 ---
Mine.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
   |dot org |org
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2009-05-26 09:09:11
   date||


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



[Bug c/40253] [4.5 Regression] label emitted for debug has no reference?

2009-05-26 Thread rguenth at gcc dot gnu dot org


--- Comment #2 from rguenth at gcc dot gnu dot org  2009-05-26 09:11 ---
Sounds similar to PR40249.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 CC|richard dot guenther at |rguenth at gcc dot gnu dot
   |gmail dot com   |org, hubicka at gcc dot gnu
   ||dot org
Summary|label emitted for debug has |[4.5 Regression] label
   |no reference?   |emitted for debug has no
   ||reference?
   Target Milestone|--- |4.5.0


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



[Bug middle-end/40252] Internal compiler error on samba4 (verify_gimple failed)

2009-05-26 Thread rguenth at gcc dot gnu dot org


--- Comment #3 from rguenth at gcc dot gnu dot org  2009-05-26 09:12 ---
Reduced testcase:

typedef unsigned int uint32_t;
static void IP(uint32_t v[2])
{
  v[0] = ((v[0]  1) | ((v[0]  31)  1L))  0xL;
}


-- 


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



[Bug fortran/27613] compile fails with Unclassifiable statement error message

2009-05-26 Thread tobi at gcc dot gnu dot org


--- Comment #14 from tobi at gcc dot gnu dot org  2009-05-26 09:38 ---
- you're lacking a comma before the place I asked you to add an ampersand,
sorry I missed that
- g95 is not gfortran
- please direct beginner's questions somewhere more appropriate


-- 


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



[Bug testsuite/40247] [4.5 Regression] Revision 147848 failed gcc.dg/struct/wo_prof_escape_substr_pointer.c

2009-05-26 Thread rguenth at gcc dot gnu dot org


--- Comment #2 from rguenth at gcc dot gnu dot org  2009-05-26 09:41 ---
Subject: Bug 40247

Author: rguenth
Date: Tue May 26 09:41:29 2009
New Revision: 147864

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147864
Log:
2009-05-26  Richard Guenther  rguent...@suse.de

PR testsuite/40247
* gcc.dg/struct/wo_prof_escape_substr_pointer.c: Obfuscate.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/struct/wo_prof_escape_substr_pointer.c


-- 


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



[Bug testsuite/40247] [4.5 Regression] Revision 147848 failed gcc.dg/struct/wo_prof_escape_substr_pointer.c

2009-05-26 Thread rguenth at gcc dot gnu dot org


--- Comment #3 from rguenth at gcc dot gnu dot org  2009-05-26 09:41 ---
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug tree-optimization/40254] New: [4.5 Regression] SPEC2006 403.gcc miscompares

2009-05-26 Thread rguenth at gcc dot gnu dot org
rev. 147829 (SLP vectorization) causes 403.gcc to miscompare when built with
-O3 -funroll-loops -fpeel-loops -ffast-math -march=native on x86_64 AMD K8
and K10.


-- 
   Summary: [4.5 Regression] SPEC2006 403.gcc miscompares
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org


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



[Bug tree-optimization/40254] [4.5 Regression] SPEC2006 403.gcc miscompares

2009-05-26 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.5.0


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



[Bug tree-optimization/32044] [4.3 Regression] final value replacement too aggressive for e.g. targets with no native div/mod insns

2009-05-26 Thread rguenth at gcc dot gnu dot org


--- Comment #70 from rguenth at gcc dot gnu dot org  2009-05-26 10:17 
---
Subject: Bug 32044

Author: rguenth
Date: Tue May 26 10:17:19 2009
New Revision: 147865

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147865
Log:
2009-05-26  Richard Guenther  rguent...@suse.de

Backport from mainline
2008-12-12  Zdenek Dvorak  o...@ucw.cz

PR tree-optimization/32044
* tree-scalar-evolution.h (expression_expensive_p): Declare.
* tree-scalar-evolution.c (expression_expensive_p): New function.
(scev_const_prop): Avoid introducing expensive expressions.
* tree-ssa-loop-ivopts.c (may_eliminate_iv): Ditto.

* gcc.dg/pr34027-1.c: Change outcome.
* gcc.dg/tree-ssa/pr32044.c: New test.

Added:
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/tree-ssa/pr32044.c
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/pr34027-1.c
branches/gcc-4_3-branch/gcc/tree-scalar-evolution.c
branches/gcc-4_3-branch/gcc/tree-scalar-evolution.h
branches/gcc-4_3-branch/gcc/tree-ssa-loop-ivopts.c


-- 


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



[Bug tree-optimization/32044] [4.3 Regression] final value replacement too aggressive for e.g. targets with no native div/mod insns

2009-05-26 Thread rguenth at gcc dot gnu dot org


--- Comment #71 from rguenth at gcc dot gnu dot org  2009-05-26 10:17 
---
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to fail|4.3.0   |4.3.0 4.3.3
 Resolution||FIXED


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



[Bug c++/40007] [4.5 regression] specialization causes access problem in primary template

2009-05-26 Thread dodji at gcc dot gnu dot org


--- Comment #7 from dodji at gcc dot gnu dot org  2009-05-26 10:35 ---
Subject: Bug 40007

Author: dodji
Date: Tue May 26 10:35:16 2009
New Revision: 147866

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147866
Log:
Fix PR c++/40007

gcc/cp/ChangeLog:
PR c++/40007
* cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Remove this accessor.
(TI_TYPEDEFS_NEEDING_ACCESS_CHECKING): New accessor.
(get_types_needing_access_check): Declare new entry point.
* pt.c (append_type_to_template_for_access_check_1,
get_types_needing_access_check): New functions.
(perform_typedefs_access_check): Accept FUNCTION_DECLs and
RECORD_TYPEs rather than TEMPLATE_DECLs. Use the new
get_types_needing_access_check, no more
MEMBER_TYPES_NEEDING_ACCESS_CHECK.
(instantiate_class_template): Set input_location to the source
location of the most specialized template definition.
Perform access check using the RECORD_TYPE of the template, not its
associated most generic TEMPLATE_DECL.
(append_type_to_template_for_access_check): Augment function
comments. Use the new get_types_needing_access_check, not
MEMBER_TYPE_NEEDING_ACCESS_CHECK. Use the new
append_type_to_template_for_access_check_1 subroutine.

gcc/testsuite/ChangeLog:
PR c++/40007
* g++.dg/template/typedef18.C: New test.
* g++.dg/template/typedef19.C: Likewise.
* g++.dg/template/typedef20.C: Likewise.
* g++.dg/template/access11.C: Adjust.


Added:
trunk/gcc/testsuite/g++.dg/template/typedef18.C
trunk/gcc/testsuite/g++.dg/template/typedef19.C
trunk/gcc/testsuite/g++.dg/template/typedef20.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/template/access11.C


-- 


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



[Bug c++/40007] [4.5 regression] specialization causes access problem in primary template

2009-05-26 Thread dodji at gcc dot gnu dot org


--- Comment #8 from dodji at gcc dot gnu dot org  2009-05-26 10:36 ---
Fixed in trunk.


-- 

dodji at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug target/40249] [4.5 Regression]: build breakage with inline heuristics change

2009-05-26 Thread hp at gcc dot gnu dot org


--- Comment #5 from hp at gcc dot gnu dot org  2009-05-26 10:56 ---
(In reply to comment #4)
 -fno-inline-functions should probably be -fno-inline.  -f[no-]inline-functions
 is semantically a no-op (it just tunes some params).

Thanks! Superficial testing (adding that option, diffing output) shows that
could be it.  Will test and likely commit an obvious patch.


-- 

hp at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2009-05-26 10:56:46
   date||


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



[Bug c/40255] New: internal compiler error: in root_var_init, at tree-ssa-live.c:1034

2009-05-26 Thread sliwa at cft dot edu dot pl
When compiling the Cuba library from http://www.feynarts.de/cuba/ version 1.6
with gcc 4.2.4 I get:

./src/divonne/Explore.c: In function 'Explore':
./src/divonne/Explore.c:17: internal compiler error: in root_var_init, at
tree-ssa-live.c:1034

The problem is specific to gcc 4.2.4 (it does not appear with 4.1.2, 4.3.3, or
4.4.0).

When -O2 is ommitted from the command line, there is no internal compiler
error.


-- 
   Summary: internal compiler error: in root_var_init, at tree-ssa-
live.c:1034
   Product: gcc
   Version: 4.2.4
Status: UNCONFIRMED
  Severity: critical
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sliwa at cft dot edu dot pl
 GCC build triplet: x86_64-redhat-linux
  GCC host triplet: x86_64-redhat-linux
GCC target triplet: x86_64-redhat-linux


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



[Bug c/40255] internal compiler error: in root_var_init, at tree-ssa-live.c:1034

2009-05-26 Thread sliwa at cft dot edu dot pl


--- Comment #1 from sliwa at cft dot edu dot pl  2009-05-26 11:08 ---
Created an attachment (id=17918)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17918action=view)
Divonne_preprocessed.c

Compiler input that causes the internal error.


-- 


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



[Bug middle-end/40248] FAIL: gcc.c-torture/compile/20090518-1.c at -O1 and above

2009-05-26 Thread rguenth at gcc dot gnu dot org


--- Comment #1 from rguenth at gcc dot gnu dot org  2009-05-26 11:34 ---
Interesting.  On x86_64 we generate

(insn 6 5 7 3 20090518-1.c:3 (set (reg:CCZ 17 flags)
(compare:CCZ (reg/v:SI 61 [ i ])
(const_int 42 [0x2a]))) -1 (nil))

(insn 7 6 8 3 20090518-1.c:3 (set (reg:QI 64)
(eq:QI (reg:CCZ 17 flags)
(const_int 0 [0x0]))) -1 (expr_list:REG_EQUAL (eq:QI (reg/v:SI 61 [
i ])
(const_int 42 [0x2a]))
(nil)))

(insn 8 7 9 3 20090518-1.c:3 (parallel [
(set (reg:SI 63)
(zero_extend:SI (reg:QI 64)))
(clobber (reg:CC 17 flags))
]) -1 (nil))

(insn 9 8 10 3 20090518-1.c:3 (set (reg:SF 60 [ result ])
(subreg:SF (reg:SI 63) 0)) -1 (nil))


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Keywords||wrong-code


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



[Bug c++/40256] New: Explicit function template call doesn't trigger Koenig lookup when it should

2009-05-26 Thread rodolfo at rodsoft dot org
14.8.1/6 says:

But when a function template with explicit template arguments is used, the
call does not have the correct syntactic form unless there is a function
template with that name visible at the point of the call. If no such name is
visible, the call is not syntactically well-formed and argument-dependent
lookup does not apply. If some such name is visible, argument dependent lookup
applies and additional  function templates may be found in other namespaces.

Then the following example is given, which doesn't compile on GCC-4.3.3:

namespace A {
struct B { };
templateint X void f(B);
}
namespace C {
templateclass T void f(T t);
}
void g(A::B b) {
// stripping out ill-formed cases

using C::f;
f3(b);// well-formed because C::f is visible; then
// A::f is found by argument dependent lookup
}

g++ doesn't compile it, stating:

teste.cpp: In function 'void g(A::B)':
teste.cpp:12: error: no matching function for call to 'f(A::B)'

I haven't tested with 4.4, nor have found a similar bug.


-- 
   Summary: Explicit function template call doesn't trigger Koenig
lookup when it should
   Product: gcc
   Version: 4.3.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rodolfo at rodsoft dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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



[Bug middle-end/40252] Internal compiler error on samba4 (verify_gimple failed)

2009-05-26 Thread rguenth at gcc dot gnu dot org


--- Comment #4 from rguenth at gcc dot gnu dot org  2009-05-26 11:38 ---
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.5.0


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



[Bug middle-end/40252] Internal compiler error on samba4 (verify_gimple failed)

2009-05-26 Thread rguenth at gcc dot gnu dot org


--- Comment #5 from rguenth at gcc dot gnu dot org  2009-05-26 11:38 ---
Subject: Bug 40252

Author: rguenth
Date: Tue May 26 11:38:03 2009
New Revision: 147867

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147867
Log:
2009-05-26  Richard Guenther  rguent...@suse.de

PR middle-end/40252
* fold-const.c (fold_binary): Use the correct types for building
rotates.

* gcc.c-torture/compile/pr40252.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr40252.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug middle-end/40252] Internal compiler error on samba4 (verify_gimple failed)

2009-05-26 Thread rguenth at gcc dot gnu dot org


--- Comment #6 from rguenth at gcc dot gnu dot org  2009-05-26 11:41 ---
Subject: Bug 40252

Author: rguenth
Date: Tue May 26 11:41:34 2009
New Revision: 147868

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147868
Log:
2009-05-26  Richard Guenther  rguent...@suse.de

PR middle-end/40252
* fold-const.c (fold_binary): Use the correct types for building
rotates.

* gcc.c-torture/compile/pr40252.c: New testcase.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-ccp.c


-- 


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



[Bug middle-end/40248] FAIL: gcc.c-torture/compile/20090518-1.c at -O1 and above

2009-05-26 Thread rguenth at gcc dot gnu dot org


--- Comment #2 from rguenth at gcc dot gnu dot org  2009-05-26 11:55 ---
I have a patch.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
   |dot org |org
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2009-05-26 11:55:32
   date||


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



[Bug rtl-optimization/40101] [4.5 Regression] 200.sixtrack ICEs in get_seqno_by_preds, at sel-sched-ir.c:3752

2009-05-26 Thread abel at gcc dot gnu dot org


--- Comment #3 from abel at gcc dot gnu dot org  2009-05-26 12:19 ---
I have further looked at seqno handling, and it seems that we can't rip it off
without changing the region walking logic pretty much.  Seqnos are computed in
such a way that they mark the stage (the number of iteration of scheduling
loop) on which a parallel group of insns has been scheduled.  That is, if all
insns scheduled within the first iteration on fences will get #1, all insns
scheduled within the second iteration will get #2, this will be pretty much
equivalent.

Walking from higher to lower seqnos is prohibited, but not only to mark the
dynamic back-edge, but to forbid moving insns from earlier scheduling
iterations to later ones.  E.g., when pipelining, we can move insns from
stage #2 to #0 (yet unscheduled code), possibly through insns from stage #1,
but we cannot move insns from stage #1 to #0 through insns belonging to stage
#2.  

This logic is modeled by existing seqnos, so we cannot rip seqnos off without
changing the logic.  We can simplify it very slightly by making seqnos to be
plain iteration numbers like described above, but that would not allow removing
any code as I hoped.  We can also change this logic so that any movements from
scheduled to unscheduled code is possible for pipelining, but that would
require much more work and some tuning (I would probably try that later, but
not for this bug).

Thus, I would fix just the bug for now.  The fix is quite simple.  In the
situations like in the testcase, no positive seqnos around the bookkeeping insn
means that the fences will not be able to get to it.  This normally happens
during pipelining, though quite rare, so we have a code for this that would
pick up unscheduled bookkeeping and schedule it afterwards.  This logic will
deal with the test case, too.  We just need to assign pretty much arbitrary
positive seqno in this case.

So the following patch fixes the test case (it passes all SPECs) and bootstraps
on ia64 with sel-sched enabled at -O2, testing is in progress.  I will post it
to gcc-patches if the testing will look fine.


Index: gcc/sel-sched.c
===
*** gcc/sel-sched.c (revision 147558)
--- gcc/sel-sched.c (working copy)
*** find_seqno_for_bookkeeping (insn_t place
*** 4524,4534 
if (INSN_P (next)
 JUMP_P (next)
 BLOCK_FOR_INSN (next) == BLOCK_FOR_INSN (place_to_insert))
! seqno = INSN_SEQNO (next);
else if (INSN_SEQNO (join_point)  0)
  seqno = INSN_SEQNO (join_point);
else
! seqno = get_seqno_by_preds (place_to_insert);

gcc_assert (seqno  0);
return seqno;
--- 4524,4550 
if (INSN_P (next)
 JUMP_P (next)
 BLOCK_FOR_INSN (next) == BLOCK_FOR_INSN (place_to_insert))
! {
!   gcc_assert (INSN_SCHED_TIMES (next) == 0);
!   seqno = INSN_SEQNO (next);
! }
else if (INSN_SEQNO (join_point)  0)
  seqno = INSN_SEQNO (join_point);
else
! {
!   seqno = get_seqno_by_preds (place_to_insert);
!
!   /* Sometimes the fences can move in such a way that there will be
!  no instructions with positive seqno around this bookkeeping.
!  This means that there will be no way to get to it by a regular
!  fence movement.  Never mind because we pick up such pieces for
!  rescheduling anyways, so any positive value will do for now.  */
!   if (seqno  0)
! {
!   gcc_assert (pipelining_p);
!   seqno = 42;
! }
! }

gcc_assert (seqno  0);
return seqno;
Index: gcc/sel-sched-ir.c
===
*** gcc/sel-sched-ir.c  (revision 147558)
--- gcc/sel-sched-ir.c  (working copy)
*** get_seqno_of_a_pred (insn_t insn)
*** 3730,3736 
return seqno;
  }

! /*  Find the proper seqno for inserting at INSN.  */
  int
  get_seqno_by_preds (rtx insn)
  {
--- 3730,3737 
return seqno;
  }

! /*  Find the proper seqno for inserting at INSN.  Returns -1 if no
predecessors
! with positive seqno exist.  */
  int
  get_seqno_by_preds (rtx insn)
  {
*** get_seqno_by_preds (rtx insn)
*** 3749,3755 
for (i = 0, seqno = -1; i  n; i++)
  seqno = MAX (seqno, INSN_SEQNO (preds[i]));

-   gcc_assert (seqno  0);
return seqno;
  }

--- 3750,3755 


-- 


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



[Bug c++/40256] Explicit function template call doesn't trigger Koenig lookup when it should

2009-05-26 Thread rguenth at gcc dot gnu dot org


--- Comment #1 from rguenth at gcc dot gnu dot org  2009-05-26 12:21 ---
This is fixed in 4.4.0.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
  Known to fail||4.3.3
 Resolution||FIXED
   Target Milestone|--- |4.4.0


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



[Bug c/40255] internal compiler error: in root_var_init, at tree-ssa-live.c:1034

2009-05-26 Thread rguenth at gcc dot gnu dot org


--- Comment #2 from rguenth at gcc dot gnu dot org  2009-05-26 12:22 ---
The GCC 4.2 series is no longer maintained.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||WONTFIX


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



[Bug middle-end/40245] [4.5 Regression] Revision 147829 breaks SPEC CPU 2K/2006 at -O3

2009-05-26 Thread hjl dot tools at gmail dot com


--- Comment #3 from hjl dot tools at gmail dot com  2009-05-26 13:12 ---
As of revision 147844, the only remaining failure on Linux/x86-64 is
403.gcc in SPE CPU 2006:

  Running 403.gcc ref base o3 default

403.gcc: copy #0 non-zero return code (rc=1, signal=0)



Contents of expr2.err

expr.c:5010: internal error: 11


-- 


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



[Bug tree-optimization/40254] [4.5 Regression] SPEC2006 403.gcc miscompares

2009-05-26 Thread rguenth at gcc dot gnu dot org


--- Comment #1 from rguenth at gcc dot gnu dot org  2009-05-26 13:36 ---
*** Bug 40245 has been marked as a duplicate of this bug. ***


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||hjl dot tools at gmail dot
   ||com


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



[Bug middle-end/40245] [4.5 Regression] Revision 147829 breaks SPEC CPU 2K/2006 at -O3

2009-05-26 Thread rguenth at gcc dot gnu dot org


--- Comment #4 from rguenth at gcc dot gnu dot org  2009-05-26 13:36 ---


*** This bug has been marked as a duplicate of 40254 ***


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE


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



[Bug testsuite/40050] plugin tests don't work with multilib

2009-05-26 Thread hjl dot tools at gmail dot com


--- Comment #4 from hjl dot tools at gmail dot com  2009-05-26 13:58 ---
Fixed.


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


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



[Bug middle-end/40248] FAIL: gcc.c-torture/compile/20090518-1.c at -O1 and above

2009-05-26 Thread rguenth at gcc dot gnu dot org


--- Comment #3 from rguenth at gcc dot gnu dot org  2009-05-26 14:18 ---
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.5.0


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



[Bug middle-end/40248] FAIL: gcc.c-torture/compile/20090518-1.c at -O1 and above

2009-05-26 Thread rguenth at gcc dot gnu dot org


--- Comment #4 from rguenth at gcc dot gnu dot org  2009-05-26 14:18 ---
Subject: Bug 40248

Author: rguenth
Date: Tue May 26 14:17:38 2009
New Revision: 147874

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147874
Log:
2009-05-26  Richard Guenther  rguent...@suse.de

PR middle-end/40248
Revert
* expr.c (expand_expr_real_1): Avoid calling do_store_flag
with mismatched comparison modes.

* expr.c (expand_expr_real_1): Expand the operand of a
VIEW_CONVERT_EXPR in its natural mode.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/expr.c


-- 


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



[Bug fortran/40246] ICE on invalid SOURCE= using NULLIFY

2009-05-26 Thread kargl at gcc dot gnu dot org


--- Comment #2 from kargl at gcc dot gnu dot org  2009-05-26 14:18 ---
(In reply to comment #1)
 The following patch to gfc_match_nullify fixes it; however, I think one should
 additionally add
 
   gfc_free_expr (new_st.expr1);
   new_st.expr1 = NULL;
   gfc_free_expr (new_st.expr2);
   new_st.expr2 = NULL;
 
 to prevent a memory leak.


AFAICT, there is no leak.

gfc_free_statement (gfc_code *p)
{
  if (p-expr1)
gfc_free_expr (p-expr1);
  if (p-expr2)
gfc_free_expr (p-expr2);


gfc_free_expr (gfc_expr *e)
{
  if (e == NULL)
return;
  if (e-con_by_offset)
splay_tree_delete (e-con_by_offset); 
  free_expr0 (e);
  gfc_free (e);
}

The last gfc_free(e) should prevent a leak.


-- 


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



[Bug middle-end/40257] New: [4.5 Regression] Revision 147852 miscompiled 252.eon in SPEC CPU 2K

2009-05-26 Thread hjl dot tools at gmail dot com
On Linux/ia32, revision 147852

http://gcc.gnu.org/ml/gcc-cvs/2009-05/msg00829.html

miscompiled 252.eon in SPEC CPU 2K at -O2:

Running Benchmarks
  Running 252.eon ref base o2x87 default
*** Miscompare of pixels_out.kajiya, see
/export/gnu/import/rrs/spec/2000/spec/benchspec/CINT2000/252.eon/run/0002/pixels_out.kajiya.mis


-- 
   Summary: [4.5 Regression]  Revision 147852 miscompiled 252.eon in
SPEC CPU 2K
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl dot tools at gmail dot com


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



[Bug tree-optimization/40254] [4.5 Regression] SPEC2006 403.gcc miscompares

2009-05-26 Thread rguenther at suse dot de


--- Comment #3 from rguenther at suse dot de  2009-05-26 14:36 ---
Subject: Re:  [4.5 Regression] SPEC2006 403.gcc
 miscompares

On Tue, 26 May 2009, pinskia at gcc dot gnu dot org wrote:

 --- Comment #2 from pinskia at gcc dot gnu dot org  2009-05-26 14:34 
 ---
 Does -fno-strict-aliasing help?

That is of course already enabled.

Richard.


-- 


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



[Bug middle-end/40259] New: Unintended code in find_givs_in_stmt_scev (gcc/tree-ssa-loop-ivopts.c)?

2009-05-26 Thread sergei_lus at yahoo dot com
The code for  find_givs_in_stmt_scev (gcc/tree-ssa-loop-ivopts.c) used to be
(in 4.3.2) this:

  lhs = GIMPLE_STMT_OPERAND (stmt, 0);
  if (TREE_CODE (lhs) != SSA_NAME)
return false;

  if (!simple_iv (loop, stmt, GIMPLE_STMT_OPERAND (stmt, 1), iv, true))
return false;

...which has changed in 4.4.0 (or on trunk - 147831) to this: 

lhs = gimple_assign_lhs (stmt);
  if (TREE_CODE (lhs) != SSA_NAME)
return false;

  if (!simple_iv (loop, loop_containing_stmt (stmt), lhs, iv, true))
return false;

The gimple_assign_lhs is not the same as GIMPLE_STMT_OPERAND (stmt, 1). 
Was it intended to be something like this:

  if (!simple_iv (loop, loop_containing_stmt (stmt), gimple_assign_rhs_to_tree
(stmt), iv, true))
return false;


-- 
   Summary: Unintended code in find_givs_in_stmt_scev (gcc/tree-ssa-
loop-ivopts.c)?
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sergei_lus at yahoo dot com


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



[Bug libstdc++/40258] void has no trivial destructor

2009-05-26 Thread paolo dot carlini at oracle dot com


--- Comment #1 from paolo dot carlini at oracle dot com  2009-05-26 15:46 
---
According to n2857, the predicate is true for trivial types, reference types,
class types with a trivial destructor or an array of such class types: void
doesn't belong to any of those.


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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



[Bug fortran/40246] ICE on invalid SOURCE= using NULLIFY

2009-05-26 Thread burnus at gcc dot gnu dot org


--- Comment #3 from burnus at gcc dot gnu dot org  2009-05-26 14:45 ---
  The following patch to gfc_match_nullify fixes it; however, I think one 
  should additionally add
gfc_free_expr (new_st.expr1);
gfc_free_expr (new_st.expr2);
  to prevent a memory leak.
 
 AFAICT, there is no leak.
 
 gfc_free_statement (gfc_code *p)

Well, I only see a call to gfc_free_statement (new_st.next). Thus only
new_st-next and not new_st is touched. However, we added two expressions
to new_st, viz expr1 and expr2, which I believe need to be freed.

(Seemingly, we cannot free new_st itself, which would be simpler.)


-- 


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



[Bug libstdc++/40258] New: void has no trivial destructor

2009-05-26 Thread piotr dot wyderski at gmail dot com
There is a discrepancy between boost:: and std:: type traits.

#include boost/type_traits.hpp
#include type_traits
#include cstdio

int main(int argc, char *argv[]) {

fprintf(stderr, std::has_trivial_destructorvoid = %i\n,
std::has_trivial_destructorvoid::value);

fprintf(stderr, boost::has_trivial_destructorvoid = %i\n,
boost::has_trivial_destructorvoid::value);

return 0;
}

According to STD void does not have a trivial destructor,
but according to boost it does. Please state which result
is correct and if it's boost's case, then fix the traits.


-- 
   Summary: void has no trivial destructor
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: piotr dot wyderski at gmail dot com
  GCC host triplet: Cygwin/GCC4.4.0


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



[Bug middle-end/40259] Unintended code in find_givs_in_stmt_scev (gcc/tree-ssa-loop-ivopts.c)?

2009-05-26 Thread rguenth at gcc dot gnu dot org


--- Comment #1 from rguenth at gcc dot gnu dot org  2009-05-26 15:50 ---
It looks more like the code in GCC 4.3 is wrong and should use lhs here. 
Zdenek?


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||rakdver at gcc dot gnu dot
   ||org
Summary|Unintended code in  |Unintended code in
   |find_givs_in_stmt_scev  |find_givs_in_stmt_scev
   |(gcc/tree-ssa-loop- |(gcc/tree-ssa-loop-
   |ivopts.c)?  |ivopts.c)?


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



[Bug fortran/40246] ICE on invalid SOURCE= using NULLIFY

2009-05-26 Thread kargl at gcc dot gnu dot org


--- Comment #4 from kargl at gcc dot gnu dot org  2009-05-26 15:11 ---
(In reply to comment #3)
   The following patch to gfc_match_nullify fixes it; however, I think one 
   should additionally add
 gfc_free_expr (new_st.expr1);
 gfc_free_expr (new_st.expr2);
   to prevent a memory leak.
  
  AFAICT, there is no leak.
  
  gfc_free_statement (gfc_code *p)
 
 Well, I only see a call to gfc_free_statement (new_st.next). Thus only
 new_st-next and not new_st is touched. However, we added two expressions
 to new_st, viz expr1 and expr2, which I believe need to be freed.
 
 (Seemingly, we cannot free new_st itself, which would be simpler.)

I conflated your patch with new_st.next with your aside about the
memory leak.  Having looked at the code, I think you are correct
that in the cleanup: code path, we may need to expr1 and expr2.

valgrind doesn't run on FreeBSD.  Can you see if valgrind detects a
leak?


-- 


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



[Bug tree-optimization/40254] [4.5 Regression] SPEC2006 403.gcc miscompares

2009-05-26 Thread pinskia at gcc dot gnu dot org


--- Comment #2 from pinskia at gcc dot gnu dot org  2009-05-26 14:34 ---
Does -fno-strict-aliasing help?


-- 


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



[Bug c++/40260] New: g++ segfaults compiling template code

2009-05-26 Thread tux008 at googlemail dot com
Hello everybody,

today, I noticed a bug in gcc 4.4.0. The compiler segfaulted during 
the compilation process. I also tested the same code with gcc 4.3.3, which
works perfectly fine.
I narrowed it down to the following test program:



  template typename T class test
  {
  private:
  int num_bins;
  public:
  void testing(void);
  };
  template typename T void testT::testing(void)
  {
  double jackdata[this-num_bins]; 
  }

int main()
{
testdouble t;
t.testing();
}

---

The compilation command line is: 
  g++ test.cc
Error output:
  test.cc: In member function ‘void testT::testing() [with T = double]’:
  test.cc:17:   instantiated from here
  test.cc:10: internal compiler error: Segmentation fault
  Please submit a full bug report,
  with preprocessed source if appropriate.
  See http://gcc.gnu.org/bugs.html for instructions.

System information:
gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/usr --enable-shared
--enable-languages=c,c++,fortran,objc,obj-c++ --enable-threads=posix
--mandir=/usr/share/man --infodir=/usr/share/info --enable-__cxa_atexit
--disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib --enable-clocale=gnu
--disable-libstdcxx-pch --with-tune=generic
Thread model: posix
gcc version 4.4.0 (GCC)

If you need further information, please let me know.


-- 
   Summary: g++ segfaults compiling template code
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tux008 at googlemail dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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



[Bug c++/40260] g++ segfaults compiling template code

2009-05-26 Thread tux008 at googlemail dot com


--- Comment #1 from tux008 at googlemail dot com  2009-05-26 16:31 ---
Created an attachment (id=17919)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17919action=view)
precompiled file


-- 


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



[Bug c++/40260] g++ segfaults compiling template code

2009-05-26 Thread tux008 at googlemail dot com


--- Comment #2 from tux008 at googlemail dot com  2009-05-26 16:33 ---
Created an attachment (id=17920)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17920action=view)
test program which causes gcc 4.4.0 to segfault

compiling this test program provokes a segfault of gcc 4.4.0. gcc 4.3.3 works
fine, however.


-- 


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



[Bug c++/40260] g++ segfaults compiling template code

2009-05-26 Thread pinskia at gcc dot gnu dot org


--- Comment #3 from pinskia at gcc dot gnu dot org  2009-05-26 16:37 ---
Fixed in 4.4.1 already.

*** This bug has been marked as a duplicate of 40013 ***


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE


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



[Bug c++/40013] [4.4/4.5 Regression] ICE when creating a local array with size from the return value of a member function of an object in a nested class in a template class

2009-05-26 Thread pinskia at gcc dot gnu dot org


--- Comment #6 from pinskia at gcc dot gnu dot org  2009-05-26 16:37 ---
*** Bug 40260 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||tux008 at googlemail dot com


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



[Bug middle-end/39254] [4.4/4.5 Regression] gcc.c-torture/execute/va-arg-trap-1.c ICEs on powerpc-apple-darwin9

2009-05-26 Thread janis at gcc dot gnu dot org


--- Comment #13 from janis at gcc dot gnu dot org  2009-05-26 16:52 ---
I submitted Joern's patch in 

http://gcc.gnu.org/ml/gcc-patches/2009-04/msg00198.html

but it wasn't reviewed.  The test still ICEs on trunk and 4.4 branch.


-- 


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



[Bug c++/39754] [4.5 Regression] ICE: tree check: accessed elt 2 of tree_vec with 1 elts in tsubst, at cp/pt.c:9248

2009-05-26 Thread dodji at gcc dot gnu dot org


--- Comment #8 from dodji at gcc dot gnu dot org  2009-05-26 16:58 ---
A patch was submitted at
http://gcc.gnu.org/ml/gcc-patches/2009-05/msg01655.html.


-- 


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



[Bug c++/40261] New: confusing diagnostic on ill-formed template definition

2009-05-26 Thread msebor at gmail dot com
The diagnostic issued for the ill-formed definition of BT::foo() below is
quite confusing. EDG eccp issues a better message: template argument list
must match the parameter list.

$ cat z.cpp  gcc -c z.cpp
template class struct A { };
template class T, class U = AT  struct B: U { void foo (); };

template class T void BT::foo () { }

int main ()
{
Bint b;
}
z.cpp:4: error: invalid use of incomplete type ‘struct BT, AT ’
z.cpp:2: error: declaration of ‘struct BT, AT ’


-- 
   Summary: confusing diagnostic on ill-formed template definition
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: msebor at gmail dot com


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



[Bug middle-end/40259] Unintended code in find_givs_in_stmt_scev (gcc/tree-ssa-loop-ivopts.c)?

2009-05-26 Thread rakdver at gcc dot gnu dot org


--- Comment #2 from rakdver at gcc dot gnu dot org  2009-05-26 17:50 ---
(In reply to comment #1)
 It looks more like the code in GCC 4.3 is wrong and should use lhs here. 
 Zdenek?

simple_iv should return the same result in both cases, so it should not really
matter.  Is there some reason why this is reported as a bug, rather than asking
in the mailing list?


-- 


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



[Bug middle-end/40262] New: Unintended code in find_givs_in_stmt_scev (gcc/tree-ssa-loop-ivopts.c)?

2009-05-26 Thread sergei_lus at yahoo dot com
The code for  find_givs_in_stmt_scev (gcc/tree-ssa-loop-ivopts.c) used to be
(in 4.3.2) this:

  lhs = GIMPLE_STMT_OPERAND (stmt, 0);
  if (TREE_CODE (lhs) != SSA_NAME)
return false;

  if (!simple_iv (loop, stmt, GIMPLE_STMT_OPERAND (stmt, 1), iv, true))
return false;

...which has changed in 4.4.0 (or on trunk - 147831) to this: 

lhs = gimple_assign_lhs (stmt);
  if (TREE_CODE (lhs) != SSA_NAME)
return false;

  if (!simple_iv (loop, loop_containing_stmt (stmt), lhs, iv, true))
return false;

The gimple_assign_lhs is not the same as GIMPLE_STMT_OPERAND (stmt, 1). 
Was it intended to be something like this:

  if (!simple_iv (loop, loop_containing_stmt (stmt), gimple_assign_rhs_to_tree
(stmt), iv, true))
return false;


-- 
   Summary: Unintended code in find_givs_in_stmt_scev (gcc/tree-ssa-
loop-ivopts.c)?
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sergei_lus at yahoo dot com


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



[Bug middle-end/40259] Unintended code in find_givs_in_stmt_scev (gcc/tree-ssa-loop-ivopts.c)?

2009-05-26 Thread pinskia at gcc dot gnu dot org


--- Comment #3 from pinskia at gcc dot gnu dot org  2009-05-26 18:47 ---
*** Bug 40262 has been marked as a duplicate of this bug. ***


-- 


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



[Bug middle-end/40262] Unintended code in find_givs_in_stmt_scev (gcc/tree-ssa-loop-ivopts.c)?

2009-05-26 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2009-05-26 18:47 ---


*** This bug has been marked as a duplicate of 40259 ***


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE
Summary|Unintended code in  |Unintended code in
   |find_givs_in_stmt_scev  |find_givs_in_stmt_scev
   |(gcc/tree-ssa-loop- |(gcc/tree-ssa-loop-
   |ivopts.c)?  |ivopts.c)?


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



[Bug fortran/40246] ICE on invalid SOURCE= using NULLIFY

2009-05-26 Thread burnus at gcc dot gnu dot org


--- Comment #5 from burnus at gcc dot gnu dot org  2009-05-26 19:23 ---
Subject: Bug 40246

Author: burnus
Date: Tue May 26 19:23:45 2009
New Revision: 147879

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147879
Log:
2009-05-26  Tobias Burnus  bur...@net-b.de

PR fortran/40246
* match.c (gfc_match_nullify): NULLify freed pointer.

2009-05-26  Tobias Burnus  bur...@net-b.de

PR fortran/40246
* gfortran.dg/nullify_4.f90: New test.


Added:
trunk/gcc/testsuite/gfortran.dg/nullify_4.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/match.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug fortran/34053] -frecursive: No need to use the stack for local variables of the main program

2009-05-26 Thread burnus at gcc dot gnu dot org


--- Comment #4 from burnus at gcc dot gnu dot org  2009-05-26 19:29 ---
s/main_program/is_main_program/

CLOSE as WONTFIX. As Andrew pointed out, there are a couple of issues using
static memory:

1. The middle end does not optimize static variables that well as it does not
know about non-recursive procedures

2. Marking loop variables etc. as static does not work well in the context of
OpenMP's private. This problem can be reduced by using a certain threshold (as
currently done for local variables), but it always exists

3. Given all the trouble, it is unlikely that a real-world program only has a
too large array in the main program (which can be cured by this patch); more
likely is that further large arrays exists in subroutines etc. For those this
patch won't help, but ulimit -s unlimited does.

4. This seems to be a relatively rarely reported problem; general stack limit
problems are more common, though.

- CLOSE


-- 

burnus at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX


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



[Bug target/40249] [4.5 Regression]: build breakage with inline heuristics change

2009-05-26 Thread hp at gcc dot gnu dot org


--- Comment #6 from hp at gcc dot gnu dot org  2009-05-26 19:30 ---
(In reply to comment #4)
 -fno-inline-functions should probably be -fno-inline.  -f[no-]inline-functions
 is semantically a no-op (it just tunes some params).

I've verified that is a fix, but it is counter to the documentation - which
doesn't even mention -finline!  So, I'll submit as a patch, as it's not obvious
to me that the new actual behavior is correct.


-- 


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



[Bug fortran/40246] ICE on invalid SOURCE= using NULLIFY

2009-05-26 Thread burnus at gcc dot gnu dot org


--- Comment #6 from burnus at gcc dot gnu dot org  2009-05-26 19:30 ---
Fixed on the trunk (4.5). Thanks Xavier for reporting it!


-- 

burnus at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug fortran/39178] Generate main() rather than using a main in libgfortran/fmain.c

2009-05-26 Thread burnus at gcc dot gnu dot org


-- 

burnus at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |burnus at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2009-03-29 08:49:58 |2009-05-26 19:32:26
   date||


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



[Bug middle-end/40249] [4.5 Regression]: build breakage with inline heuristics change

2009-05-26 Thread hp at gcc dot gnu dot org


--- Comment #7 from hp at gcc dot gnu dot org  2009-05-26 19:44 ---
Changing to middle-end.  Nothing near target-specific.


-- 

hp at gcc dot gnu dot org changed:

   What|Removed |Added

  Component|target  |middle-end


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



[Bug middle-end/40249] [4.5 Regression]: build breakage with inline heuristics change

2009-05-26 Thread hp at gcc dot gnu dot org


-- 

hp at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |hp at gcc dot gnu dot org
   |dot org |
URL||http://gcc.gnu.org/ml/gcc-
   ||patches/2009-
   ||05/msg01678.html
 Status|NEW |ASSIGNED
   Keywords||patch
   Last reconfirmed|2009-05-26 10:56:46 |2009-05-26 19:53:12
   date||


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



[Bug c++/33979] support for char16_t, char32_t

2009-05-26 Thread loufoque at gmail dot com


--- Comment #16 from loufoque at gmail dot com  2009-05-26 20:10 ---
It seems the current patch makes char16_t and char32_t keywords.
According to the linked specifications, however, those should only be typedefs
to the actual keywords, which are _Char16_t and _Char32_t.
Those typedefs should be in the file cuchar.

Note this is the same design as bool/_Bool/stdbool.h in C99.


-- 

loufoque at gmail dot com changed:

   What|Removed |Added

 CC||loufoque at gmail dot com


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



[Bug c++/33979] support for char16_t, char32_t

2009-05-26 Thread loufoque at gmail dot com


--- Comment #17 from loufoque at gmail dot com  2009-05-26 20:16 ---
Ignore my previous comment; it seems that was changed since in the current
C++0x draft those are indeed keywords.


-- 


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



[Bug libstdc++/40263] New: random unform real distro: tr1 vs c++0x

2009-05-26 Thread bkoz at gcc dot gnu dot org
Having some problems porting some code between C++0x and TR1. The C++0x version
works as expected, but the TR1 uniform_real distribution seems to be returning
elements outside the given range.

And example:

#include string
#include iostream

#ifdef __GXX_EXPERIMENTAL_CXX0X__
# include functional
# include random
#else
# include tr1/functional
# include tr1/random
#endif

#ifdef __GXX_EXPERIMENTAL_CXX0X__
typedef std::uniform_real_distributiondouble  distribution_type;
typedef std::mt19937engine_type;
#else
typedef std::tr1::uniform_realdouble  distribution_type;
typedef std::tr1::mt19937   engine_type;
#endif

double
generate()
{
  const distribution_type distribution(0, 1);
  static engine_type engine;

#ifdef __GXX_EXPERIMENTAL_CXX0X__
  static auto generator = std::bind(distribution, engine);
#else
  typedef std::tr1::_Binddistribution_type(engine_type) __result_type;
  static __result_type generator = std::tr1::bind(distribution, engine);
#endif

  double random = generator();
  if (random  distribution.min() || random  distribution.max())
{
  std::string __s(throw_allocator::throw_conditionally);
  __s += \n;
  __s += random number generated is: ;
  char buf[40];
  __builtin_sprintf(buf, %f, random);
  __s += buf;
  std::__throw_out_of_range(__s.c_str());
}
  else
std::cout  random  std::endl;

  return random;
}

int main()
{
  for (int i(0); i  50; ++i)
std::cout  generate()  std::endl;
  return 0;
}


Gives me this for C++03:

%./a.out 
terminate called after throwing an instance of 'std::out_of_range'
  what():  throw_allocator::throw_conditionally
random number generated is: 3499211612.00
Abort

Gives me this for C++0x (-std=gnu++0x)
...
0.0512164
0.0512164
0.0364413
0.0364413
0.408731
0.408731
0.457989
0.457989
0.487569
0.487569
0.793975
0.793975
0.920875
0.920875
0.807531
0.807531
...


-- 
   Summary: random unform real distro: tr1 vs c++0x
   Product: gcc
   Version: 4.4.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bkoz at gcc dot gnu dot org


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



[Bug fortran/40264] New: Recursive constraint for specific calling same-named generic procedure

2009-05-26 Thread burnus at gcc dot gnu dot org
Interpretation request tracking bug

 * * *

Found at
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/c05874d85748d9e6

The problem is
  function f() result(res)
res = f(something)

where f is both a specific and a generic function and f(something) matches
a the different generic function.

However, Section 12.5.2.1 of Fortran 2003 has:
If RESULT is specified, [...] all occurrences of the
 function name in execution-part statements in the
 scoping unit refer to the function itself.

This somehow clashes with other parts of the standard and it is currently
unclear whether the program is valid. Some compilers accept it (e.g. gfortran),
others reject it.

  * * *

Submitted as interpretation request for
J3 MEETING 189 LAS VEGAS, NEVADA, August 10 - 14, 2009
http://www.j3-fortran.org/doc/year/09/paper189.txt

Presumably will be:
http://www.j3-fortran.org/doc/year/09/09-237.txt


-- 
   Summary: Recursive constraint for specific calling same-named
generic procedure
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Keywords: accepts-invalid
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org


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



[Bug fortran/39178] Generate main() rather than using a main in libgfortran/fmain.c

2009-05-26 Thread burnus at gcc dot gnu dot org


--- Comment #4 from burnus at gcc dot gnu dot org  2009-05-26 21:20 ---
Subject: Bug 39178

Author: burnus
Date: Tue May 26 21:19:57 2009
New Revision: 147883

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147883
Log:
fortran/
2009-05-26  Tobias Burnus  bur...@net-b.de

PR fortran/39178
* gfortranspec.c (lang_specific_driver): Stop linking
libgfortranbegin.
* trans-decl.c (gfc_build_builtin_function_decls): Stop
making MAIN__ publicly visible.
(gfc_build_builtin_function_decls): Add
gfor_fndecl_set_args.
(create_main_function) New function.
(gfc_generate_function_code): Use it.

libgfortran/
2009-05-26  Tobias Burnus  bur...@net-b.de

PR fortran/39178
* runtime/main.c (store_exe_path): Make static
and multiple-times callable.
(set_args): Call store_exe_path.
* libgfortran.h: Remove store_exe_path prototype.
* fmain.c (main): Remove store_exe_path call.


Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/gfortranspec.c
trunk/gcc/fortran/trans-decl.c
trunk/libgfortran/ChangeLog
trunk/libgfortran/fmain.c
trunk/libgfortran/libgfortran.h
trunk/libgfortran/runtime/main.c


-- 


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



[Bug libstdc++/40263] random unform real distro: tr1 vs c++0x

2009-05-26 Thread paolo dot carlini at oracle dot com


--- Comment #1 from paolo dot carlini at oracle dot com  2009-05-26 21:47 
---
I suspect that your usage of the tr1 version doesn't conform to 5.1.1/9,
because the tr1 version of uniform_real is really trivial, there isn't much to
fix (see also the comment just before the implementation itself, about the
requirements for the URNG).


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING


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



[Bug target/40265] New: sh2a compiler ICEs in simplify_subreg, at simplify-rtx.c:4960

2009-05-26 Thread kkojima at gcc dot gnu dot org
Newlib build fails during compiling libc/stdlib/ldtoa.c for m2a with

  internal compiler error: in simplify_subreg, at simplify-rtx.c:4960

A reduced testcase is

void
foo (unsigned short *x, unsigned short *y)
{
  unsigned short *p = x;

  *y = 0;
  if (*p++)
*y = 0x8000;
}

For m2a, movrt insn is defined as

(define_insn movrt
  [(set (match_operand:SI 0 arith_reg_dest =r)
(if_then_else (eq:SI (reg:SI T_REG) (const_int 0))
(const_int 1)
(const_int 0)))]
  TARGET_SH2A
  movrt\\t%0
   [(set_attr type arith)])

and now sh.c:sh_expand_t_scc generates this insn as an scc
instruction.  It seems that it's too complex as an scc insn
and confuses the combine phase.  I'm testing the patch below
which uses another movrt insn with more simple arithmetic
definition

(define_insn xorsi3_movrt
  [(set (match_operand:SI 0 arith_reg_dest =r)
(xor:SI (reg:SI T_REG)
(const_int 1)))]
  TARGET_SH2A
  movrt\\t%0
  [(set_attr type arith)])

diff -uprN ORIG/trunk/gcc/config/sh/sh.c trunk/gcc/config/sh/sh.c
--- ORIG/trunk/gcc/config/sh/sh.c   2009-05-25 08:19:47.0 +0900
+++ trunk/gcc/config/sh/sh.c2009-05-27 07:32:14.0 +0900
@@ -11085,7 +11085,7 @@ sh_expand_t_scc (rtx operands[])
 emit_insn (gen_movt (result));
   else if (TARGET_SH2A  ((code == EQ  val == 0)
|| (code == NE  val == 1)))
-emit_insn (gen_movrt (result));
+emit_insn (gen_xorsi3_movrt (result));
   else if ((code == EQ  val == 0) || (code == NE  val == 1))
 {
   emit_clobber (result);
diff -uprN ORIG/trunk/gcc/config/sh/sh.md trunk/gcc/config/sh/sh.md
--- ORIG/trunk/gcc/config/sh/sh.md  2009-05-19 10:49:14.0 +0900
+++ trunk/gcc/config/sh/sh.md   2009-05-27 07:32:14.0 +0900
@@ -9109,16 +9109,6 @@ mov.l\\t1f,r0\\n\\
   movt%0
   [(set_attr type arith)])

-;; complements the T bit and stores the result in a register
-(define_insn movrt
-  [(set (match_operand:SI 0 arith_reg_dest =r)
-(if_then_else (eq:SI (reg:SI T_REG) (const_int 0))
-(const_int 1)
-(const_int 0)))]
-  TARGET_SH2A
-  movrt\\t%0
-   [(set_attr type arith)])
-
 (define_expand cstore4_media
   [(set (match_operand:SI 0 register_operand =r)
(match_operator:SI 1 sh_float_comparison_operator


-- 
   Summary: sh2a compiler ICEs in simplify_subreg, at simplify-
rtx.c:4960
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kkojima at gcc dot gnu dot org
GCC target triplet: sh-unkonwn-elf


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



[Bug target/40265] sh2a compiler ICEs in simplify_subreg, at simplify-rtx.c:4960

2009-05-26 Thread kkojima at gcc dot gnu dot org


-- 

kkojima at gcc dot gnu dot org changed:

   What|Removed |Added

   Priority|P3  |P4


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



[Bug libfortran/22423] Warnings when building libgfortran

2009-05-26 Thread jvdelisle at gcc dot gnu dot org


--- Comment #20 from jvdelisle at gcc dot gnu dot org  2009-05-27 01:22 
---
Subject: Bug 22423

Author: jvdelisle
Date: Wed May 27 01:21:22 2009
New Revision: 147887

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147887
Log:
2009-05-23  Jerry DeLisle  jvdeli...@gcc.gnu.org

Backport from mainline:
PR libfortran/37754
* io/write_float.def: Simplify format calculation.

2009-05-23  Francois-Xavier Coudert  fxcoud...@gcc.gnu.org

Backport from mainline:
PR fortran/22423
* io/transfer.c (read_block_direct): Avoid warning.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39667
* io/file_pos.c (st_rewind): Don't truncate or flush.
* io/intrinsics.c (fgetc): Flush if switching mode.
(fputc): Likewise.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39782
* io/transfer.c (data_transfer_init): Don't flush before seek.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/io.h (is_preconnected): Remove prototype.
* io/unix.c (is_preconnected): Remove function.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/38668
* io/transfer.c (finalize_transfer): Don't flush for advance='no'.

2009-05-23 Danny Smith  dannysm...@clear.net.nz

Backport from mainline:
* io/write.c (itoa) : Rename back to gfc_itoa.
(write_i): Adjust call to write_decimal.
(write_integer):  Use gfc_itoa.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/io.h (move_pos_offset): Remove prototype.
* io/transfer.c (formatted_transfer_scalar_read): Use sseek
instead of move_pos_offset.
* io/unix.c (move_pos_offset): Remove.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39665 libfortran/39702 libfortran/39709
* io/io.h (st_parameter_dt): Revert aligned attribute from u.p.value.
* io/list_read.c (read_complex): Read directly into user pointer.
(read_real): Likewise.
(list_formatted_read_scalar): Update read_complex and read_real calls.
(nml_read_obj): Read directly into user pointer.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39665
* io/io.h (st_parameter_dt): Add aligned attribute to u.p.value.
* io/read.c (convert_real): Add note about alignment requirements.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/open.c (already_open): Test for POSIX close return value.
* io/unit.c (close_unit_1): Likewise.
* io/unix.c (raw_close): Return 0 for success for preconnected units.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* runtime/error.c (gfc_itoa): Move to io/write.c
(xtoa): Rename to gfc_xtoa.
* runtime/backtrace.c (show_backtrace): Call gfc_xtoa.
* libgfortran.h (gfc_itoa): Remove prototype.
(xtoa): Rename prototype to gfc_xtoa.
* io/list_read.c (nml_read_obj): Use size_t for string length.
* io/transfer.c (read_block_direct): Change nbytes arg from
pointer to value.
(unformatted_read): Minor cleanup, call read_block_directly properly.
(skip_record): Use ssize_t.
(next_record_w_unf): Avoid stell() call by calling sseek with SEEK_CUR.
(iolength_transfer): Make sure to multiply before cast.
* io/intrinsics.c (fgetc): Remove unnecessary variable.
* io/format.c (format_hash): Use gfc_charlen_type.
* io/write.c (itoa): Move from runtime/error.c:gfc_itoa, rename,
make static.
(write_i): Call with pointer to itoa.
(write_z): Call with pointer to gfc_xtoa.
(write_integer): Pointer to itoa.
(nml_write_obj): Type cleanup, don't call strlen in loop.

2009-05-23  H.J. Lu  hongjiu...@intel.com

Backport from mainline:
PR libgfortran/39664
* io/unix.c (raw_close): Don't close STDOUT_FILENO,
STDERR_FILENO nor STDIN_FILENO.

2009-05-23  David Edelsohn  edels...@gnu.org

Backport from mainline:
* io/io.h (struct stream): Rename truncate to trunc.
(struncate): Same.
* io/unix.c (raw_init): Rename truncate to trunc.
(buf_init): Same.
(open_internal): Same.

2009-05-23  Daniel Kraft  d...@domob.eu

Backport from mainline:
PR fortran/38654
* io/read.c (read_f): Reworked to speed up floating point parsing.
(convert_real): Use pointer-casting instead of memcpy and temporaries.

2009-05-23  Jerry DeLisle  jvdeli...@gcc.gnu.org

Backport from mainline:
PR libfortran/37754
* io/io.h (format_hash_entry): New structure for hash 

[Bug libfortran/38668] advance=no: no buffering, truncate and seek

2009-05-26 Thread jvdelisle at gcc dot gnu dot org


--- Comment #5 from jvdelisle at gcc dot gnu dot org  2009-05-27 01:22 
---
Subject: Bug 38668

Author: jvdelisle
Date: Wed May 27 01:21:22 2009
New Revision: 147887

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147887
Log:
2009-05-23  Jerry DeLisle  jvdeli...@gcc.gnu.org

Backport from mainline:
PR libfortran/37754
* io/write_float.def: Simplify format calculation.

2009-05-23  Francois-Xavier Coudert  fxcoud...@gcc.gnu.org

Backport from mainline:
PR fortran/22423
* io/transfer.c (read_block_direct): Avoid warning.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39667
* io/file_pos.c (st_rewind): Don't truncate or flush.
* io/intrinsics.c (fgetc): Flush if switching mode.
(fputc): Likewise.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39782
* io/transfer.c (data_transfer_init): Don't flush before seek.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/io.h (is_preconnected): Remove prototype.
* io/unix.c (is_preconnected): Remove function.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/38668
* io/transfer.c (finalize_transfer): Don't flush for advance='no'.

2009-05-23 Danny Smith  dannysm...@clear.net.nz

Backport from mainline:
* io/write.c (itoa) : Rename back to gfc_itoa.
(write_i): Adjust call to write_decimal.
(write_integer):  Use gfc_itoa.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/io.h (move_pos_offset): Remove prototype.
* io/transfer.c (formatted_transfer_scalar_read): Use sseek
instead of move_pos_offset.
* io/unix.c (move_pos_offset): Remove.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39665 libfortran/39702 libfortran/39709
* io/io.h (st_parameter_dt): Revert aligned attribute from u.p.value.
* io/list_read.c (read_complex): Read directly into user pointer.
(read_real): Likewise.
(list_formatted_read_scalar): Update read_complex and read_real calls.
(nml_read_obj): Read directly into user pointer.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39665
* io/io.h (st_parameter_dt): Add aligned attribute to u.p.value.
* io/read.c (convert_real): Add note about alignment requirements.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/open.c (already_open): Test for POSIX close return value.
* io/unit.c (close_unit_1): Likewise.
* io/unix.c (raw_close): Return 0 for success for preconnected units.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* runtime/error.c (gfc_itoa): Move to io/write.c
(xtoa): Rename to gfc_xtoa.
* runtime/backtrace.c (show_backtrace): Call gfc_xtoa.
* libgfortran.h (gfc_itoa): Remove prototype.
(xtoa): Rename prototype to gfc_xtoa.
* io/list_read.c (nml_read_obj): Use size_t for string length.
* io/transfer.c (read_block_direct): Change nbytes arg from
pointer to value.
(unformatted_read): Minor cleanup, call read_block_directly properly.
(skip_record): Use ssize_t.
(next_record_w_unf): Avoid stell() call by calling sseek with SEEK_CUR.
(iolength_transfer): Make sure to multiply before cast.
* io/intrinsics.c (fgetc): Remove unnecessary variable.
* io/format.c (format_hash): Use gfc_charlen_type.
* io/write.c (itoa): Move from runtime/error.c:gfc_itoa, rename,
make static.
(write_i): Call with pointer to itoa.
(write_z): Call with pointer to gfc_xtoa.
(write_integer): Pointer to itoa.
(nml_write_obj): Type cleanup, don't call strlen in loop.

2009-05-23  H.J. Lu  hongjiu...@intel.com

Backport from mainline:
PR libgfortran/39664
* io/unix.c (raw_close): Don't close STDOUT_FILENO,
STDERR_FILENO nor STDIN_FILENO.

2009-05-23  David Edelsohn  edels...@gnu.org

Backport from mainline:
* io/io.h (struct stream): Rename truncate to trunc.
(struncate): Same.
* io/unix.c (raw_init): Rename truncate to trunc.
(buf_init): Same.
(open_internal): Same.

2009-05-23  Daniel Kraft  d...@domob.eu

Backport from mainline:
PR fortran/38654
* io/read.c (read_f): Reworked to speed up floating point parsing.
(convert_real): Use pointer-casting instead of memcpy and temporaries.

2009-05-23  Jerry DeLisle  jvdeli...@gcc.gnu.org

Backport from mainline:
PR libfortran/37754
* io/io.h (format_hash_entry): New structure for hash 

[Bug fortran/39782] [4.3/4.4 Regression] IO depends on uninitialised value

2009-05-26 Thread jvdelisle at gcc dot gnu dot org


--- Comment #13 from jvdelisle at gcc dot gnu dot org  2009-05-27 01:22 
---
Subject: Bug 39782

Author: jvdelisle
Date: Wed May 27 01:21:22 2009
New Revision: 147887

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147887
Log:
2009-05-23  Jerry DeLisle  jvdeli...@gcc.gnu.org

Backport from mainline:
PR libfortran/37754
* io/write_float.def: Simplify format calculation.

2009-05-23  Francois-Xavier Coudert  fxcoud...@gcc.gnu.org

Backport from mainline:
PR fortran/22423
* io/transfer.c (read_block_direct): Avoid warning.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39667
* io/file_pos.c (st_rewind): Don't truncate or flush.
* io/intrinsics.c (fgetc): Flush if switching mode.
(fputc): Likewise.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39782
* io/transfer.c (data_transfer_init): Don't flush before seek.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/io.h (is_preconnected): Remove prototype.
* io/unix.c (is_preconnected): Remove function.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/38668
* io/transfer.c (finalize_transfer): Don't flush for advance='no'.

2009-05-23 Danny Smith  dannysm...@clear.net.nz

Backport from mainline:
* io/write.c (itoa) : Rename back to gfc_itoa.
(write_i): Adjust call to write_decimal.
(write_integer):  Use gfc_itoa.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/io.h (move_pos_offset): Remove prototype.
* io/transfer.c (formatted_transfer_scalar_read): Use sseek
instead of move_pos_offset.
* io/unix.c (move_pos_offset): Remove.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39665 libfortran/39702 libfortran/39709
* io/io.h (st_parameter_dt): Revert aligned attribute from u.p.value.
* io/list_read.c (read_complex): Read directly into user pointer.
(read_real): Likewise.
(list_formatted_read_scalar): Update read_complex and read_real calls.
(nml_read_obj): Read directly into user pointer.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39665
* io/io.h (st_parameter_dt): Add aligned attribute to u.p.value.
* io/read.c (convert_real): Add note about alignment requirements.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/open.c (already_open): Test for POSIX close return value.
* io/unit.c (close_unit_1): Likewise.
* io/unix.c (raw_close): Return 0 for success for preconnected units.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* runtime/error.c (gfc_itoa): Move to io/write.c
(xtoa): Rename to gfc_xtoa.
* runtime/backtrace.c (show_backtrace): Call gfc_xtoa.
* libgfortran.h (gfc_itoa): Remove prototype.
(xtoa): Rename prototype to gfc_xtoa.
* io/list_read.c (nml_read_obj): Use size_t for string length.
* io/transfer.c (read_block_direct): Change nbytes arg from
pointer to value.
(unformatted_read): Minor cleanup, call read_block_directly properly.
(skip_record): Use ssize_t.
(next_record_w_unf): Avoid stell() call by calling sseek with SEEK_CUR.
(iolength_transfer): Make sure to multiply before cast.
* io/intrinsics.c (fgetc): Remove unnecessary variable.
* io/format.c (format_hash): Use gfc_charlen_type.
* io/write.c (itoa): Move from runtime/error.c:gfc_itoa, rename,
make static.
(write_i): Call with pointer to itoa.
(write_z): Call with pointer to gfc_xtoa.
(write_integer): Pointer to itoa.
(nml_write_obj): Type cleanup, don't call strlen in loop.

2009-05-23  H.J. Lu  hongjiu...@intel.com

Backport from mainline:
PR libgfortran/39664
* io/unix.c (raw_close): Don't close STDOUT_FILENO,
STDERR_FILENO nor STDIN_FILENO.

2009-05-23  David Edelsohn  edels...@gnu.org

Backport from mainline:
* io/io.h (struct stream): Rename truncate to trunc.
(struncate): Same.
* io/unix.c (raw_init): Rename truncate to trunc.
(buf_init): Same.
(open_internal): Same.

2009-05-23  Daniel Kraft  d...@domob.eu

Backport from mainline:
PR fortran/38654
* io/read.c (read_f): Reworked to speed up floating point parsing.
(convert_real): Use pointer-casting instead of memcpy and temporaries.

2009-05-23  Jerry DeLisle  jvdeli...@gcc.gnu.org

Backport from mainline:
PR libfortran/37754
* io/io.h (format_hash_entry): New structure for hash 

[Bug libfortran/25561] Eventually get rid of the Alloc Stream Facility

2009-05-26 Thread jvdelisle at gcc dot gnu dot org


--- Comment #15 from jvdelisle at gcc dot gnu dot org  2009-05-27 01:22 
---
Subject: Bug 25561

Author: jvdelisle
Date: Wed May 27 01:21:22 2009
New Revision: 147887

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147887
Log:
2009-05-23  Jerry DeLisle  jvdeli...@gcc.gnu.org

Backport from mainline:
PR libfortran/37754
* io/write_float.def: Simplify format calculation.

2009-05-23  Francois-Xavier Coudert  fxcoud...@gcc.gnu.org

Backport from mainline:
PR fortran/22423
* io/transfer.c (read_block_direct): Avoid warning.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39667
* io/file_pos.c (st_rewind): Don't truncate or flush.
* io/intrinsics.c (fgetc): Flush if switching mode.
(fputc): Likewise.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39782
* io/transfer.c (data_transfer_init): Don't flush before seek.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/io.h (is_preconnected): Remove prototype.
* io/unix.c (is_preconnected): Remove function.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/38668
* io/transfer.c (finalize_transfer): Don't flush for advance='no'.

2009-05-23 Danny Smith  dannysm...@clear.net.nz

Backport from mainline:
* io/write.c (itoa) : Rename back to gfc_itoa.
(write_i): Adjust call to write_decimal.
(write_integer):  Use gfc_itoa.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/io.h (move_pos_offset): Remove prototype.
* io/transfer.c (formatted_transfer_scalar_read): Use sseek
instead of move_pos_offset.
* io/unix.c (move_pos_offset): Remove.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39665 libfortran/39702 libfortran/39709
* io/io.h (st_parameter_dt): Revert aligned attribute from u.p.value.
* io/list_read.c (read_complex): Read directly into user pointer.
(read_real): Likewise.
(list_formatted_read_scalar): Update read_complex and read_real calls.
(nml_read_obj): Read directly into user pointer.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39665
* io/io.h (st_parameter_dt): Add aligned attribute to u.p.value.
* io/read.c (convert_real): Add note about alignment requirements.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/open.c (already_open): Test for POSIX close return value.
* io/unit.c (close_unit_1): Likewise.
* io/unix.c (raw_close): Return 0 for success for preconnected units.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* runtime/error.c (gfc_itoa): Move to io/write.c
(xtoa): Rename to gfc_xtoa.
* runtime/backtrace.c (show_backtrace): Call gfc_xtoa.
* libgfortran.h (gfc_itoa): Remove prototype.
(xtoa): Rename prototype to gfc_xtoa.
* io/list_read.c (nml_read_obj): Use size_t for string length.
* io/transfer.c (read_block_direct): Change nbytes arg from
pointer to value.
(unformatted_read): Minor cleanup, call read_block_directly properly.
(skip_record): Use ssize_t.
(next_record_w_unf): Avoid stell() call by calling sseek with SEEK_CUR.
(iolength_transfer): Make sure to multiply before cast.
* io/intrinsics.c (fgetc): Remove unnecessary variable.
* io/format.c (format_hash): Use gfc_charlen_type.
* io/write.c (itoa): Move from runtime/error.c:gfc_itoa, rename,
make static.
(write_i): Call with pointer to itoa.
(write_z): Call with pointer to gfc_xtoa.
(write_integer): Pointer to itoa.
(nml_write_obj): Type cleanup, don't call strlen in loop.

2009-05-23  H.J. Lu  hongjiu...@intel.com

Backport from mainline:
PR libgfortran/39664
* io/unix.c (raw_close): Don't close STDOUT_FILENO,
STDERR_FILENO nor STDIN_FILENO.

2009-05-23  David Edelsohn  edels...@gnu.org

Backport from mainline:
* io/io.h (struct stream): Rename truncate to trunc.
(struncate): Same.
* io/unix.c (raw_init): Rename truncate to trunc.
(buf_init): Same.
(open_internal): Same.

2009-05-23  Daniel Kraft  d...@domob.eu

Backport from mainline:
PR fortran/38654
* io/read.c (read_f): Reworked to speed up floating point parsing.
(convert_real): Use pointer-casting instead of memcpy and temporaries.

2009-05-23  Jerry DeLisle  jvdeli...@gcc.gnu.org

Backport from mainline:
PR libfortran/37754
* io/io.h (format_hash_entry): New structure for hash 

[Bug fortran/39667] I/O possibly unneccesary truncations

2009-05-26 Thread jvdelisle at gcc dot gnu dot org


--- Comment #3 from jvdelisle at gcc dot gnu dot org  2009-05-27 01:22 
---
Subject: Bug 39667

Author: jvdelisle
Date: Wed May 27 01:21:22 2009
New Revision: 147887

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147887
Log:
2009-05-23  Jerry DeLisle  jvdeli...@gcc.gnu.org

Backport from mainline:
PR libfortran/37754
* io/write_float.def: Simplify format calculation.

2009-05-23  Francois-Xavier Coudert  fxcoud...@gcc.gnu.org

Backport from mainline:
PR fortran/22423
* io/transfer.c (read_block_direct): Avoid warning.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39667
* io/file_pos.c (st_rewind): Don't truncate or flush.
* io/intrinsics.c (fgetc): Flush if switching mode.
(fputc): Likewise.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39782
* io/transfer.c (data_transfer_init): Don't flush before seek.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/io.h (is_preconnected): Remove prototype.
* io/unix.c (is_preconnected): Remove function.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/38668
* io/transfer.c (finalize_transfer): Don't flush for advance='no'.

2009-05-23 Danny Smith  dannysm...@clear.net.nz

Backport from mainline:
* io/write.c (itoa) : Rename back to gfc_itoa.
(write_i): Adjust call to write_decimal.
(write_integer):  Use gfc_itoa.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/io.h (move_pos_offset): Remove prototype.
* io/transfer.c (formatted_transfer_scalar_read): Use sseek
instead of move_pos_offset.
* io/unix.c (move_pos_offset): Remove.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39665 libfortran/39702 libfortran/39709
* io/io.h (st_parameter_dt): Revert aligned attribute from u.p.value.
* io/list_read.c (read_complex): Read directly into user pointer.
(read_real): Likewise.
(list_formatted_read_scalar): Update read_complex and read_real calls.
(nml_read_obj): Read directly into user pointer.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39665
* io/io.h (st_parameter_dt): Add aligned attribute to u.p.value.
* io/read.c (convert_real): Add note about alignment requirements.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/open.c (already_open): Test for POSIX close return value.
* io/unit.c (close_unit_1): Likewise.
* io/unix.c (raw_close): Return 0 for success for preconnected units.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* runtime/error.c (gfc_itoa): Move to io/write.c
(xtoa): Rename to gfc_xtoa.
* runtime/backtrace.c (show_backtrace): Call gfc_xtoa.
* libgfortran.h (gfc_itoa): Remove prototype.
(xtoa): Rename prototype to gfc_xtoa.
* io/list_read.c (nml_read_obj): Use size_t for string length.
* io/transfer.c (read_block_direct): Change nbytes arg from
pointer to value.
(unformatted_read): Minor cleanup, call read_block_directly properly.
(skip_record): Use ssize_t.
(next_record_w_unf): Avoid stell() call by calling sseek with SEEK_CUR.
(iolength_transfer): Make sure to multiply before cast.
* io/intrinsics.c (fgetc): Remove unnecessary variable.
* io/format.c (format_hash): Use gfc_charlen_type.
* io/write.c (itoa): Move from runtime/error.c:gfc_itoa, rename,
make static.
(write_i): Call with pointer to itoa.
(write_z): Call with pointer to gfc_xtoa.
(write_integer): Pointer to itoa.
(nml_write_obj): Type cleanup, don't call strlen in loop.

2009-05-23  H.J. Lu  hongjiu...@intel.com

Backport from mainline:
PR libgfortran/39664
* io/unix.c (raw_close): Don't close STDOUT_FILENO,
STDERR_FILENO nor STDIN_FILENO.

2009-05-23  David Edelsohn  edels...@gnu.org

Backport from mainline:
* io/io.h (struct stream): Rename truncate to trunc.
(struncate): Same.
* io/unix.c (raw_init): Rename truncate to trunc.
(buf_init): Same.
(open_internal): Same.

2009-05-23  Daniel Kraft  d...@domob.eu

Backport from mainline:
PR fortran/38654
* io/read.c (read_f): Reworked to speed up floating point parsing.
(convert_real): Use pointer-casting instead of memcpy and temporaries.

2009-05-23  Jerry DeLisle  jvdeli...@gcc.gnu.org

Backport from mainline:
PR libfortran/37754
* io/io.h (format_hash_entry): New structure for hash 

[Bug libfortran/38654] Fortran I/O speedup

2009-05-26 Thread jvdelisle at gcc dot gnu dot org


--- Comment #9 from jvdelisle at gcc dot gnu dot org  2009-05-27 01:22 
---
Subject: Bug 38654

Author: jvdelisle
Date: Wed May 27 01:21:22 2009
New Revision: 147887

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147887
Log:
2009-05-23  Jerry DeLisle  jvdeli...@gcc.gnu.org

Backport from mainline:
PR libfortran/37754
* io/write_float.def: Simplify format calculation.

2009-05-23  Francois-Xavier Coudert  fxcoud...@gcc.gnu.org

Backport from mainline:
PR fortran/22423
* io/transfer.c (read_block_direct): Avoid warning.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39667
* io/file_pos.c (st_rewind): Don't truncate or flush.
* io/intrinsics.c (fgetc): Flush if switching mode.
(fputc): Likewise.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39782
* io/transfer.c (data_transfer_init): Don't flush before seek.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/io.h (is_preconnected): Remove prototype.
* io/unix.c (is_preconnected): Remove function.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/38668
* io/transfer.c (finalize_transfer): Don't flush for advance='no'.

2009-05-23 Danny Smith  dannysm...@clear.net.nz

Backport from mainline:
* io/write.c (itoa) : Rename back to gfc_itoa.
(write_i): Adjust call to write_decimal.
(write_integer):  Use gfc_itoa.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/io.h (move_pos_offset): Remove prototype.
* io/transfer.c (formatted_transfer_scalar_read): Use sseek
instead of move_pos_offset.
* io/unix.c (move_pos_offset): Remove.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39665 libfortran/39702 libfortran/39709
* io/io.h (st_parameter_dt): Revert aligned attribute from u.p.value.
* io/list_read.c (read_complex): Read directly into user pointer.
(read_real): Likewise.
(list_formatted_read_scalar): Update read_complex and read_real calls.
(nml_read_obj): Read directly into user pointer.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39665
* io/io.h (st_parameter_dt): Add aligned attribute to u.p.value.
* io/read.c (convert_real): Add note about alignment requirements.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/open.c (already_open): Test for POSIX close return value.
* io/unit.c (close_unit_1): Likewise.
* io/unix.c (raw_close): Return 0 for success for preconnected units.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* runtime/error.c (gfc_itoa): Move to io/write.c
(xtoa): Rename to gfc_xtoa.
* runtime/backtrace.c (show_backtrace): Call gfc_xtoa.
* libgfortran.h (gfc_itoa): Remove prototype.
(xtoa): Rename prototype to gfc_xtoa.
* io/list_read.c (nml_read_obj): Use size_t for string length.
* io/transfer.c (read_block_direct): Change nbytes arg from
pointer to value.
(unformatted_read): Minor cleanup, call read_block_directly properly.
(skip_record): Use ssize_t.
(next_record_w_unf): Avoid stell() call by calling sseek with SEEK_CUR.
(iolength_transfer): Make sure to multiply before cast.
* io/intrinsics.c (fgetc): Remove unnecessary variable.
* io/format.c (format_hash): Use gfc_charlen_type.
* io/write.c (itoa): Move from runtime/error.c:gfc_itoa, rename,
make static.
(write_i): Call with pointer to itoa.
(write_z): Call with pointer to gfc_xtoa.
(write_integer): Pointer to itoa.
(nml_write_obj): Type cleanup, don't call strlen in loop.

2009-05-23  H.J. Lu  hongjiu...@intel.com

Backport from mainline:
PR libgfortran/39664
* io/unix.c (raw_close): Don't close STDOUT_FILENO,
STDERR_FILENO nor STDIN_FILENO.

2009-05-23  David Edelsohn  edels...@gnu.org

Backport from mainline:
* io/io.h (struct stream): Rename truncate to trunc.
(struncate): Same.
* io/unix.c (raw_init): Rename truncate to trunc.
(buf_init): Same.
(open_internal): Same.

2009-05-23  Daniel Kraft  d...@domob.eu

Backport from mainline:
PR fortran/38654
* io/read.c (read_f): Reworked to speed up floating point parsing.
(convert_real): Use pointer-casting instead of memcpy and temporaries.

2009-05-23  Jerry DeLisle  jvdeli...@gcc.gnu.org

Backport from mainline:
PR libfortran/37754
* io/io.h (format_hash_entry): New structure for hash 

[Bug libfortran/37754] [4.4 Regression] READ I/O Performance regression from 4.3 to 4.4/4.5

2009-05-26 Thread jvdelisle at gcc dot gnu dot org


--- Comment #17 from jvdelisle at gcc dot gnu dot org  2009-05-27 01:22 
---
Subject: Bug 37754

Author: jvdelisle
Date: Wed May 27 01:21:22 2009
New Revision: 147887

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147887
Log:
2009-05-23  Jerry DeLisle  jvdeli...@gcc.gnu.org

Backport from mainline:
PR libfortran/37754
* io/write_float.def: Simplify format calculation.

2009-05-23  Francois-Xavier Coudert  fxcoud...@gcc.gnu.org

Backport from mainline:
PR fortran/22423
* io/transfer.c (read_block_direct): Avoid warning.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39667
* io/file_pos.c (st_rewind): Don't truncate or flush.
* io/intrinsics.c (fgetc): Flush if switching mode.
(fputc): Likewise.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39782
* io/transfer.c (data_transfer_init): Don't flush before seek.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/io.h (is_preconnected): Remove prototype.
* io/unix.c (is_preconnected): Remove function.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/38668
* io/transfer.c (finalize_transfer): Don't flush for advance='no'.

2009-05-23 Danny Smith  dannysm...@clear.net.nz

Backport from mainline:
* io/write.c (itoa) : Rename back to gfc_itoa.
(write_i): Adjust call to write_decimal.
(write_integer):  Use gfc_itoa.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/io.h (move_pos_offset): Remove prototype.
* io/transfer.c (formatted_transfer_scalar_read): Use sseek
instead of move_pos_offset.
* io/unix.c (move_pos_offset): Remove.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39665 libfortran/39702 libfortran/39709
* io/io.h (st_parameter_dt): Revert aligned attribute from u.p.value.
* io/list_read.c (read_complex): Read directly into user pointer.
(read_real): Likewise.
(list_formatted_read_scalar): Update read_complex and read_real calls.
(nml_read_obj): Read directly into user pointer.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39665
* io/io.h (st_parameter_dt): Add aligned attribute to u.p.value.
* io/read.c (convert_real): Add note about alignment requirements.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/open.c (already_open): Test for POSIX close return value.
* io/unit.c (close_unit_1): Likewise.
* io/unix.c (raw_close): Return 0 for success for preconnected units.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* runtime/error.c (gfc_itoa): Move to io/write.c
(xtoa): Rename to gfc_xtoa.
* runtime/backtrace.c (show_backtrace): Call gfc_xtoa.
* libgfortran.h (gfc_itoa): Remove prototype.
(xtoa): Rename prototype to gfc_xtoa.
* io/list_read.c (nml_read_obj): Use size_t for string length.
* io/transfer.c (read_block_direct): Change nbytes arg from
pointer to value.
(unformatted_read): Minor cleanup, call read_block_directly properly.
(skip_record): Use ssize_t.
(next_record_w_unf): Avoid stell() call by calling sseek with SEEK_CUR.
(iolength_transfer): Make sure to multiply before cast.
* io/intrinsics.c (fgetc): Remove unnecessary variable.
* io/format.c (format_hash): Use gfc_charlen_type.
* io/write.c (itoa): Move from runtime/error.c:gfc_itoa, rename,
make static.
(write_i): Call with pointer to itoa.
(write_z): Call with pointer to gfc_xtoa.
(write_integer): Pointer to itoa.
(nml_write_obj): Type cleanup, don't call strlen in loop.

2009-05-23  H.J. Lu  hongjiu...@intel.com

Backport from mainline:
PR libgfortran/39664
* io/unix.c (raw_close): Don't close STDOUT_FILENO,
STDERR_FILENO nor STDIN_FILENO.

2009-05-23  David Edelsohn  edels...@gnu.org

Backport from mainline:
* io/io.h (struct stream): Rename truncate to trunc.
(struncate): Same.
* io/unix.c (raw_init): Rename truncate to trunc.
(buf_init): Same.
(open_internal): Same.

2009-05-23  Daniel Kraft  d...@domob.eu

Backport from mainline:
PR fortran/38654
* io/read.c (read_f): Reworked to speed up floating point parsing.
(convert_real): Use pointer-casting instead of memcpy and temporaries.

2009-05-23  Jerry DeLisle  jvdeli...@gcc.gnu.org

Backport from mainline:
PR libfortran/37754
* io/io.h (format_hash_entry): New structure for hash 

[Bug libfortran/39664] [4.5 Regression] Revision 145571 breaks stdio

2009-05-26 Thread jvdelisle at gcc dot gnu dot org


--- Comment #16 from jvdelisle at gcc dot gnu dot org  2009-05-27 01:22 
---
Subject: Bug 39664

Author: jvdelisle
Date: Wed May 27 01:21:22 2009
New Revision: 147887

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147887
Log:
2009-05-23  Jerry DeLisle  jvdeli...@gcc.gnu.org

Backport from mainline:
PR libfortran/37754
* io/write_float.def: Simplify format calculation.

2009-05-23  Francois-Xavier Coudert  fxcoud...@gcc.gnu.org

Backport from mainline:
PR fortran/22423
* io/transfer.c (read_block_direct): Avoid warning.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39667
* io/file_pos.c (st_rewind): Don't truncate or flush.
* io/intrinsics.c (fgetc): Flush if switching mode.
(fputc): Likewise.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39782
* io/transfer.c (data_transfer_init): Don't flush before seek.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/io.h (is_preconnected): Remove prototype.
* io/unix.c (is_preconnected): Remove function.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/38668
* io/transfer.c (finalize_transfer): Don't flush for advance='no'.

2009-05-23 Danny Smith  dannysm...@clear.net.nz

Backport from mainline:
* io/write.c (itoa) : Rename back to gfc_itoa.
(write_i): Adjust call to write_decimal.
(write_integer):  Use gfc_itoa.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/io.h (move_pos_offset): Remove prototype.
* io/transfer.c (formatted_transfer_scalar_read): Use sseek
instead of move_pos_offset.
* io/unix.c (move_pos_offset): Remove.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39665 libfortran/39702 libfortran/39709
* io/io.h (st_parameter_dt): Revert aligned attribute from u.p.value.
* io/list_read.c (read_complex): Read directly into user pointer.
(read_real): Likewise.
(list_formatted_read_scalar): Update read_complex and read_real calls.
(nml_read_obj): Read directly into user pointer.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39665
* io/io.h (st_parameter_dt): Add aligned attribute to u.p.value.
* io/read.c (convert_real): Add note about alignment requirements.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/open.c (already_open): Test for POSIX close return value.
* io/unit.c (close_unit_1): Likewise.
* io/unix.c (raw_close): Return 0 for success for preconnected units.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* runtime/error.c (gfc_itoa): Move to io/write.c
(xtoa): Rename to gfc_xtoa.
* runtime/backtrace.c (show_backtrace): Call gfc_xtoa.
* libgfortran.h (gfc_itoa): Remove prototype.
(xtoa): Rename prototype to gfc_xtoa.
* io/list_read.c (nml_read_obj): Use size_t for string length.
* io/transfer.c (read_block_direct): Change nbytes arg from
pointer to value.
(unformatted_read): Minor cleanup, call read_block_directly properly.
(skip_record): Use ssize_t.
(next_record_w_unf): Avoid stell() call by calling sseek with SEEK_CUR.
(iolength_transfer): Make sure to multiply before cast.
* io/intrinsics.c (fgetc): Remove unnecessary variable.
* io/format.c (format_hash): Use gfc_charlen_type.
* io/write.c (itoa): Move from runtime/error.c:gfc_itoa, rename,
make static.
(write_i): Call with pointer to itoa.
(write_z): Call with pointer to gfc_xtoa.
(write_integer): Pointer to itoa.
(nml_write_obj): Type cleanup, don't call strlen in loop.

2009-05-23  H.J. Lu  hongjiu...@intel.com

Backport from mainline:
PR libgfortran/39664
* io/unix.c (raw_close): Don't close STDOUT_FILENO,
STDERR_FILENO nor STDIN_FILENO.

2009-05-23  David Edelsohn  edels...@gnu.org

Backport from mainline:
* io/io.h (struct stream): Rename truncate to trunc.
(struncate): Same.
* io/unix.c (raw_init): Rename truncate to trunc.
(buf_init): Same.
(open_internal): Same.

2009-05-23  Daniel Kraft  d...@domob.eu

Backport from mainline:
PR fortran/38654
* io/read.c (read_f): Reworked to speed up floating point parsing.
(convert_real): Use pointer-casting instead of memcpy and temporaries.

2009-05-23  Jerry DeLisle  jvdeli...@gcc.gnu.org

Backport from mainline:
PR libfortran/37754
* io/io.h (format_hash_entry): New structure for hash 

[Bug libfortran/39665] [4.5 Regression] Fortran IO using unaligned accesses to read/write doubles.

2009-05-26 Thread jvdelisle at gcc dot gnu dot org


--- Comment #13 from jvdelisle at gcc dot gnu dot org  2009-05-27 01:22 
---
Subject: Bug 39665

Author: jvdelisle
Date: Wed May 27 01:21:22 2009
New Revision: 147887

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147887
Log:
2009-05-23  Jerry DeLisle  jvdeli...@gcc.gnu.org

Backport from mainline:
PR libfortran/37754
* io/write_float.def: Simplify format calculation.

2009-05-23  Francois-Xavier Coudert  fxcoud...@gcc.gnu.org

Backport from mainline:
PR fortran/22423
* io/transfer.c (read_block_direct): Avoid warning.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39667
* io/file_pos.c (st_rewind): Don't truncate or flush.
* io/intrinsics.c (fgetc): Flush if switching mode.
(fputc): Likewise.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39782
* io/transfer.c (data_transfer_init): Don't flush before seek.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/io.h (is_preconnected): Remove prototype.
* io/unix.c (is_preconnected): Remove function.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/38668
* io/transfer.c (finalize_transfer): Don't flush for advance='no'.

2009-05-23 Danny Smith  dannysm...@clear.net.nz

Backport from mainline:
* io/write.c (itoa) : Rename back to gfc_itoa.
(write_i): Adjust call to write_decimal.
(write_integer):  Use gfc_itoa.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/io.h (move_pos_offset): Remove prototype.
* io/transfer.c (formatted_transfer_scalar_read): Use sseek
instead of move_pos_offset.
* io/unix.c (move_pos_offset): Remove.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39665 libfortran/39702 libfortran/39709
* io/io.h (st_parameter_dt): Revert aligned attribute from u.p.value.
* io/list_read.c (read_complex): Read directly into user pointer.
(read_real): Likewise.
(list_formatted_read_scalar): Update read_complex and read_real calls.
(nml_read_obj): Read directly into user pointer.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
PR libfortran/39665
* io/io.h (st_parameter_dt): Add aligned attribute to u.p.value.
* io/read.c (convert_real): Add note about alignment requirements.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* io/open.c (already_open): Test for POSIX close return value.
* io/unit.c (close_unit_1): Likewise.
* io/unix.c (raw_close): Return 0 for success for preconnected units.

2009-05-23  Janne Blomqvist  j...@gcc.gnu.org

Backport from mainline:
* runtime/error.c (gfc_itoa): Move to io/write.c
(xtoa): Rename to gfc_xtoa.
* runtime/backtrace.c (show_backtrace): Call gfc_xtoa.
* libgfortran.h (gfc_itoa): Remove prototype.
(xtoa): Rename prototype to gfc_xtoa.
* io/list_read.c (nml_read_obj): Use size_t for string length.
* io/transfer.c (read_block_direct): Change nbytes arg from
pointer to value.
(unformatted_read): Minor cleanup, call read_block_directly properly.
(skip_record): Use ssize_t.
(next_record_w_unf): Avoid stell() call by calling sseek with SEEK_CUR.
(iolength_transfer): Make sure to multiply before cast.
* io/intrinsics.c (fgetc): Remove unnecessary variable.
* io/format.c (format_hash): Use gfc_charlen_type.
* io/write.c (itoa): Move from runtime/error.c:gfc_itoa, rename,
make static.
(write_i): Call with pointer to itoa.
(write_z): Call with pointer to gfc_xtoa.
(write_integer): Pointer to itoa.
(nml_write_obj): Type cleanup, don't call strlen in loop.

2009-05-23  H.J. Lu  hongjiu...@intel.com

Backport from mainline:
PR libgfortran/39664
* io/unix.c (raw_close): Don't close STDOUT_FILENO,
STDERR_FILENO nor STDIN_FILENO.

2009-05-23  David Edelsohn  edels...@gnu.org

Backport from mainline:
* io/io.h (struct stream): Rename truncate to trunc.
(struncate): Same.
* io/unix.c (raw_init): Rename truncate to trunc.
(buf_init): Same.
(open_internal): Same.

2009-05-23  Daniel Kraft  d...@domob.eu

Backport from mainline:
PR fortran/38654
* io/read.c (read_f): Reworked to speed up floating point parsing.
(convert_real): Use pointer-casting instead of memcpy and temporaries.

2009-05-23  Jerry DeLisle  jvdeli...@gcc.gnu.org

Backport from mainline:
PR libfortran/37754
* io/io.h (format_hash_entry): New structure for hash 

[Bug libfortran/37754] [4.4 Regression] READ I/O Performance regression from 4.3 to 4.4/4.5

2009-05-26 Thread jvdelisle at gcc dot gnu dot org


--- Comment #18 from jvdelisle at gcc dot gnu dot org  2009-05-27 01:47 
---
Fixed on 4.4, closing


-- 

jvdelisle at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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



[Bug libfortran/40187] c_f_pointer with stride in SHAPE

2009-05-26 Thread tkoenig at gcc dot gnu dot org


--- Comment #6 from tkoenig at gcc dot gnu dot org  2009-05-27 05:27 ---
Subject: Bug 40187

Author: tkoenig
Date: Wed May 27 05:27:31 2009
New Revision: 147894

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147894
Log:
2009-05-27  Thomas Koenig  tkoe...@gcc.gnu.org

PR libfortran/40187
* intrinsics/iso_c_binding.c (c_f_pointer_u0):  Take care
of stride in shape argument.

2009-05-27  Thomas Koenig  tkoe...@gcc.gnu.org

PR libfortran/40187
* gfortran.dg/c_f_pointer_shape_tests_4.f03:  New file.
* gfortran.dg/c_f_pointer_shape_tests_4_driver.c:  New file.


Added:
trunk/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_4.f03
trunk/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_4_driver.c
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/libgfortran/ChangeLog
trunk/libgfortran/intrinsics/iso_c_binding.c


-- 


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



[Bug c/40266] New: march-native gives -mno-sse4, but cpuinfo sse4_1

2009-05-26 Thread seandarcy2 at gmail dot com
If I run gcc -fverbose-asm -mtune=native -march=native -S x.c

I get
cat x.s:
   .file   x.c
# GNU C (GCC) version 4.4.0 20090506 (Red Hat 4.4.0-4) (x86_64-redhat-linux)
#   compiled by GNU C version 4.4.0 20090506 (Red Hat 4.4.0-4), GMP
version 4.2.4, MPFR version 2.4.1.
# GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
# options passed:  x.c -march=core2 -mcx16 -msahf --param l1-cache-size=32
# --param l1-cache-line-size=64 --param l2-cache-size=2048 -mtune=core2
# -fverbose-asm
# options enabled:  -falign-loops -fargument-alias
...
# -mfp-ret-in-387 -mfused-madd -mglibc -mieee-fp -mmmx -mno-sse4
# -mpush-args -mred-zone -msahf -msse -msse2 -msse3 -mssse3


cat /proc/cpuinfo:

flags   : .sse sse2  ssse3  sse4_1 ...

It appears that since the cpu doesn't support both sse4.1 and sse4.2, gcc
march-native disables sse4 altogether. Obviously, -msse4.1 -mno-sse4.2 would be
better.


-- 
   Summary: march-native gives -mno-sse4, but cpuinfo sse4_1
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: seandarcy2 at gmail dot com
 GCC build triplet: x86_64-redhat-linux
  GCC host triplet: x86_64-redhat-linux
GCC target triplet: x86_64-redhat-linux


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