[Bug fortran/36233] [Regression 4.4,4.3] Array valued actual procedure argument rejected

2008-05-17 Thread pault at gcc dot gnu dot org


--- Comment #6 from pault at gcc dot gnu dot org  2008-05-17 07:11 ---
Subject: Bug 36233

Author: pault
Date: Sat May 17 07:10:13 2008
New Revision: 135461

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=135461
Log:
2008-05-17  Paul Thomas  [EMAIL PROTECTED]

Backport from mainline:
PR fortran/35756
PR fortran/35759
* trans-stmt.c (gfc_trans_where): Tighten up the dependency
check for calling gfc_trans_where_3.

PR fortran/35743
* trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
if it is calculated to be negative.

PR fortran/35745
* trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
ss-where for scalar right hand sides.
* trans-array.c (gfc_add_loop_ss_code): If ss-where is set do
not evaluate scalars outside the loop.  Clean up whitespace.
* trans.h : Add a bitfield 'where' to gfc_ss.

   PR fortran/36233
   * interface.c (compare_actual_formal): Do not check sizes if the
   actual is BT_PROCEDURE.

2008-05-17  Paul Thomas  [EMAIL PROTECTED]

Backport from mainline:
PR fortran/35756
PR fortran/35759
* gfortran.dg/where_1.f90: New test.

PR fortran/35743
PR fortran/35745
* gfortran.dg/where_2.f90: New test.

   PR fortran/36233
   * gfortran.dg/actual_procedure_1.f90: New test

Added:
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/actual_procedure_1.f90
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/where_1.f90
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/where_2.f90
Modified:
branches/gcc-4_3-branch/gcc/fortran/ChangeLog
branches/gcc-4_3-branch/gcc/fortran/interface.c
branches/gcc-4_3-branch/gcc/fortran/trans-array.c
branches/gcc-4_3-branch/gcc/fortran/trans-stmt.c
branches/gcc-4_3-branch/gcc/fortran/trans.h
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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



[Bug fortran/35743] allocate negative memory for zero-sized WHERE construct

2008-05-17 Thread pault at gcc dot gnu dot org


--- Comment #4 from pault at gcc dot gnu dot org  2008-05-17 07:11 ---
Subject: Bug 35743

Author: pault
Date: Sat May 17 07:10:13 2008
New Revision: 135461

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=135461
Log:
2008-05-17  Paul Thomas  [EMAIL PROTECTED]

Backport from mainline:
PR fortran/35756
PR fortran/35759
* trans-stmt.c (gfc_trans_where): Tighten up the dependency
check for calling gfc_trans_where_3.

PR fortran/35743
* trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
if it is calculated to be negative.

PR fortran/35745
* trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
ss-where for scalar right hand sides.
* trans-array.c (gfc_add_loop_ss_code): If ss-where is set do
not evaluate scalars outside the loop.  Clean up whitespace.
* trans.h : Add a bitfield 'where' to gfc_ss.

   PR fortran/36233
   * interface.c (compare_actual_formal): Do not check sizes if the
   actual is BT_PROCEDURE.

2008-05-17  Paul Thomas  [EMAIL PROTECTED]

Backport from mainline:
PR fortran/35756
PR fortran/35759
* gfortran.dg/where_1.f90: New test.

PR fortran/35743
PR fortran/35745
* gfortran.dg/where_2.f90: New test.

   PR fortran/36233
   * gfortran.dg/actual_procedure_1.f90: New test

Added:
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/actual_procedure_1.f90
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/where_1.f90
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/where_2.f90
Modified:
branches/gcc-4_3-branch/gcc/fortran/ChangeLog
branches/gcc-4_3-branch/gcc/fortran/interface.c
branches/gcc-4_3-branch/gcc/fortran/trans-array.c
branches/gcc-4_3-branch/gcc/fortran/trans-stmt.c
branches/gcc-4_3-branch/gcc/fortran/trans.h
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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



[Bug fortran/35759] WHERE with overlap with ELSEWHERE error

2008-05-17 Thread pault at gcc dot gnu dot org


--- Comment #4 from pault at gcc dot gnu dot org  2008-05-17 07:11 ---
Subject: Bug 35759

Author: pault
Date: Sat May 17 07:10:13 2008
New Revision: 135461

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=135461
Log:
2008-05-17  Paul Thomas  [EMAIL PROTECTED]

Backport from mainline:
PR fortran/35756
PR fortran/35759
* trans-stmt.c (gfc_trans_where): Tighten up the dependency
check for calling gfc_trans_where_3.

PR fortran/35743
* trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
if it is calculated to be negative.

PR fortran/35745
* trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
ss-where for scalar right hand sides.
* trans-array.c (gfc_add_loop_ss_code): If ss-where is set do
not evaluate scalars outside the loop.  Clean up whitespace.
* trans.h : Add a bitfield 'where' to gfc_ss.

   PR fortran/36233
   * interface.c (compare_actual_formal): Do not check sizes if the
   actual is BT_PROCEDURE.

2008-05-17  Paul Thomas  [EMAIL PROTECTED]

Backport from mainline:
PR fortran/35756
PR fortran/35759
* gfortran.dg/where_1.f90: New test.

PR fortran/35743
PR fortran/35745
* gfortran.dg/where_2.f90: New test.

   PR fortran/36233
   * gfortran.dg/actual_procedure_1.f90: New test

Added:
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/actual_procedure_1.f90
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/where_1.f90
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/where_2.f90
Modified:
branches/gcc-4_3-branch/gcc/fortran/ChangeLog
branches/gcc-4_3-branch/gcc/fortran/interface.c
branches/gcc-4_3-branch/gcc/fortran/trans-array.c
branches/gcc-4_3-branch/gcc/fortran/trans-stmt.c
branches/gcc-4_3-branch/gcc/fortran/trans.h
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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



[Bug fortran/35745] Divide incorrectly extracted from WHERE block?; run time abort

2008-05-17 Thread pault at gcc dot gnu dot org


--- Comment #4 from pault at gcc dot gnu dot org  2008-05-17 07:11 ---
Subject: Bug 35745

Author: pault
Date: Sat May 17 07:10:13 2008
New Revision: 135461

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=135461
Log:
2008-05-17  Paul Thomas  [EMAIL PROTECTED]

Backport from mainline:
PR fortran/35756
PR fortran/35759
* trans-stmt.c (gfc_trans_where): Tighten up the dependency
check for calling gfc_trans_where_3.

PR fortran/35743
* trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
if it is calculated to be negative.

PR fortran/35745
* trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
ss-where for scalar right hand sides.
* trans-array.c (gfc_add_loop_ss_code): If ss-where is set do
not evaluate scalars outside the loop.  Clean up whitespace.
* trans.h : Add a bitfield 'where' to gfc_ss.

   PR fortran/36233
   * interface.c (compare_actual_formal): Do not check sizes if the
   actual is BT_PROCEDURE.

2008-05-17  Paul Thomas  [EMAIL PROTECTED]

Backport from mainline:
PR fortran/35756
PR fortran/35759
* gfortran.dg/where_1.f90: New test.

PR fortran/35743
PR fortran/35745
* gfortran.dg/where_2.f90: New test.

   PR fortran/36233
   * gfortran.dg/actual_procedure_1.f90: New test

Added:
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/actual_procedure_1.f90
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/where_1.f90
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/where_2.f90
Modified:
branches/gcc-4_3-branch/gcc/fortran/ChangeLog
branches/gcc-4_3-branch/gcc/fortran/interface.c
branches/gcc-4_3-branch/gcc/fortran/trans-array.c
branches/gcc-4_3-branch/gcc/fortran/trans-stmt.c
branches/gcc-4_3-branch/gcc/fortran/trans.h
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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



[Bug fortran/35756] incorrect WHERE for functions in ELSEWHERE and overlaps

2008-05-17 Thread pault at gcc dot gnu dot org


--- Comment #4 from pault at gcc dot gnu dot org  2008-05-17 07:11 ---
Subject: Bug 35756

Author: pault
Date: Sat May 17 07:10:13 2008
New Revision: 135461

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=135461
Log:
2008-05-17  Paul Thomas  [EMAIL PROTECTED]

Backport from mainline:
PR fortran/35756
PR fortran/35759
* trans-stmt.c (gfc_trans_where): Tighten up the dependency
check for calling gfc_trans_where_3.

PR fortran/35743
* trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
if it is calculated to be negative.

PR fortran/35745
* trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
ss-where for scalar right hand sides.
* trans-array.c (gfc_add_loop_ss_code): If ss-where is set do
not evaluate scalars outside the loop.  Clean up whitespace.
* trans.h : Add a bitfield 'where' to gfc_ss.

   PR fortran/36233
   * interface.c (compare_actual_formal): Do not check sizes if the
   actual is BT_PROCEDURE.

2008-05-17  Paul Thomas  [EMAIL PROTECTED]

Backport from mainline:
PR fortran/35756
PR fortran/35759
* gfortran.dg/where_1.f90: New test.

PR fortran/35743
PR fortran/35745
* gfortran.dg/where_2.f90: New test.

   PR fortran/36233
   * gfortran.dg/actual_procedure_1.f90: New test

Added:
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/actual_procedure_1.f90
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/where_1.f90
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/where_2.f90
Modified:
branches/gcc-4_3-branch/gcc/fortran/ChangeLog
branches/gcc-4_3-branch/gcc/fortran/interface.c
branches/gcc-4_3-branch/gcc/fortran/trans-array.c
branches/gcc-4_3-branch/gcc/fortran/trans-stmt.c
branches/gcc-4_3-branch/gcc/fortran/trans.h
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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



[Bug fortran/35759] WHERE with overlap with ELSEWHERE error

2008-05-17 Thread pault at gcc dot gnu dot org


--- Comment #5 from pault at gcc dot gnu dot org  2008-05-17 07:16 ---
Fixed on trunk and 4.3.

Thanks for the report.

Paul


-- 

pault at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug fortran/35756] incorrect WHERE for functions in ELSEWHERE and overlaps

2008-05-17 Thread pault at gcc dot gnu dot org


--- Comment #5 from pault at gcc dot gnu dot org  2008-05-17 07:16 ---
Fixed on trunk and 4.3.

Thanks for the report.

Paul


-- 

pault at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug fortran/35743] allocate negative memory for zero-sized WHERE construct

2008-05-17 Thread pault at gcc dot gnu dot org


--- Comment #5 from pault at gcc dot gnu dot org  2008-05-17 07:17 ---
Fixed on trunk and 4.3.

Thanks for the report.

Paul


-- 

pault at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug fortran/35745] Divide incorrectly extracted from WHERE block?; run time abort

2008-05-17 Thread pault at gcc dot gnu dot org


--- Comment #5 from pault at gcc dot gnu dot org  2008-05-17 07:17 ---
Fixed on trunk and 4.3.

Thanks for the report.

Paul


-- 

pault at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug ada/36207] [4.4 regression] Ada bootstrap fails in uintp.adb:1595

2008-05-17 Thread dannysmith at users dot sourceforge dot net


--- Comment #4 from dannysmith at users dot sourceforge dot net  2008-05-17 
07:27 ---
Is this related to PR35493?
A possibly related cygwin failure was also reported here.
http://gcc.gnu.org/ml/gcc/2008-03/msg00681.html.

My last successful build of Ada on mingw was:
gcc version 4.4.0 20080312 (experimental) (GCC)

Danny


-- 

dannysmith at users dot sourceforge dot net changed:

   What|Removed |Added

 CC||dannysmith at users dot
   ||sourceforge dot net


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



[Bug fortran/36233] [Regression 4.4,4.3] Array valued actual procedure argument rejected

2008-05-17 Thread pault at gcc dot gnu dot org


--- Comment #7 from pault at gcc dot gnu dot org  2008-05-17 08:20 ---
Fixed on trunk and 4.3.

Thanks for the report.

Paul


-- 

pault at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug c++/36254] New: wrong control reaches end of non-void function warning

2008-05-17 Thread pluto at agmk dot net
$ g++ t1.cpp -Wall -c
t1.cpp: In function 'bool f()':
t1.cpp:10: warning: control reaches end of non-void function

$ g++ t2.cpp -Wall -c
t2.cpp: In function 'bool f(int)':
t2.cpp:16: warning: control reaches end of non-void function

tested on 4.1.2, 4.2.3-20080201 and 4.3.0-20080417


-- 
   Summary: wrong control reaches end of non-void function warning
   Product: gcc
   Version: 4.3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pluto at agmk dot net
  GCC host triplet: x86_64-gnu-linux


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



[Bug c++/36254] wrong control reaches end of non-void function warning

2008-05-17 Thread pluto at agmk dot net


--- Comment #1 from pluto at agmk dot net  2008-05-17 09:54 ---
Created an attachment (id=15647)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15647action=view)
testcase.


-- 


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



[Bug c++/36254] wrong control reaches end of non-void function warning

2008-05-17 Thread pluto at agmk dot net


--- Comment #2 from pluto at agmk dot net  2008-05-17 09:54 ---
Created an attachment (id=15648)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15648action=view)
testcase.


-- 


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



[Bug c/36255] New: -fstrict-aliasing breaks __builtin_va_args

2008-05-17 Thread juanjose dot garciaripoll at gmail dot com
When using -fstrict-aliasing the function LC1_f15 below gets miscompiled. More
precisely, the va_list object is only partially assigned. The system fails to
set the frame size or something similar. In the assembler I see

/*  local function %F15   */
static cl_object LC1_f15(cl_narg narg, volatile cl_object *lex0, ...)
{
cl_object value0;
cl_object V1;
va_list args; va_start(args,lex0);
   0:   48 8d 44 24 08  lea0x8(%rsp),%rax
   5:   48 89 44 24 e0  mov%rax,-0x20(%rsp)
if (narg  1) {
   a:   ba 00 00 00 00  mov$0x0,%edx
   f:   48 85 fftest   %rdi,%rdi
  12:   7e 1a   jle2e LC1_f15+0x2e
  V1=0;
} else {
  V1= va_arg(args,cl_object);
  14:   8b 44 24 d8 mov-0x28(%rsp),%eax
  18:   83 f8 30cmp$0x30,%eax

Here we are reading -0x28(%rsp) which has not been set. The same code, with gcc
4.1 produces an assignment mov 0x10,-0x28(%rsp) that makes things right. The
preprocessed example follows.

# 1 /usr/lib/gcc/x86_64-linux-gnu/4.2.3/include/stdarg.h 1 3 4
# 43 /usr/lib/gcc/x86_64-linux-gnu/4.2.3/include/stdarg.h 3 4
typedef __builtin_va_list __gnuc_va_list;
# 105 /usr/lib/gcc/x86_64-linux-gnu/4.2.3/include/stdarg.h 3 4
typedef __gnuc_va_list va_list;

typedef long cl_fixnum;
typedef unsigned long cl_index;
typedef union cl_lispunion *cl_object;
typedef cl_fixnum cl_narg;

struct ecl_singlefloat {
 float SFVAL;
};

struct ecl_stack_frame {
 cl_object *bottom;
 cl_object *top;
 cl_object *stack;
};

union cl_lispunion {
 struct ecl_singlefloat SF;
 struct ecl_stack_frame frame;
};

struct cl_env_struct2 {
 cl_index nvalues;
 cl_object values[64];
};

extern struct cl_env_struct2 cl_env2;


static cl_object LC1_f15(cl_narg narg, volatile cl_object *lex0, ...)
{
 cl_object value0;
 cl_object V1;
 va_list args; __builtin_va_start(args,lex0);
 if (narg  1) {
   V1=0;
 } else {
  V1= __builtin_va_arg(args,cl_object);
 }
 value0=V1; cl_env2.nvalues=1;
 return value0;
}


cl_object LC2__g147(cl_object V1, cl_object V2, cl_object V3)
{
 cl_object T0;
 volatile cl_object lex0[1];
 cl_object value0;
 {
 lex0[0]= V3;
 value0=LC1_f15(1,lex0,MAKE_FIXNUM(-2688612)) ;
 return value0;
}}


-- 
   Summary: -fstrict-aliasing breaks __builtin_va_args
   Product: gcc
   Version: 4.2.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: juanjose dot garciaripoll at gmail dot com
 GCC build triplet: x86_64-linux-gnu
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu


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



[Bug c++/36254] wrong control reaches end of non-void function warning

2008-05-17 Thread pluto at agmk dot net


--- Comment #3 from pluto at agmk dot net  2008-05-17 11:13 ---
4.4.0-20080517 also fails.


-- 

pluto at agmk dot net changed:

   What|Removed |Added

  Known to fail|4.1.2 4.2.3 4.3.0   |4.1.2 4.2.3 4.3.0 4.4.0


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



[Bug c/36256] New: Build failure in snapshot of 05/16/08 under Sparc Linux

2008-05-17 Thread michael dot a dot richmond at nasa dot gov
The gcc snapshot of 05/16/08 failed to build under Sparc Linux. Listed below
are the last few lines of the output from running make:

/home/mrichmon/gcc-4.4-20080516/g95/./prev-gcc/xgcc
-B/home/mrichmon/gcc-4.4-20080516/g95/./prev-gcc/
-B/home/mrichmon/irun/sparc-unknown-linux-gnu/bin/ -c  -g -O2 -DIN_GCC   -W
-Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros
-Wno-overlength-strings -Werror   -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild
-I/home/mrichmon/gcc-4.4-20080516/gcc
-I/home/mrichmon/gcc-4.4-20080516/gcc/build
-I/home/mrichmon/gcc-4.4-20080516/gcc/../include
-I/home/mrichmon/gcc-4.4-20080516/gcc/../libcpp/include
-I/home/mrichmon/mpfr-2.3.1
-I/home/mrichmon/gcc-4.4-20080516/gcc/../libdecnumber
-I/home/mrichmon/gcc-4.4-20080516/gcc/../libdecnumber/dpd -I../libdecnumber  -o
build/genconstants.o /home/mrichmon/gcc-4.4-20080516/gcc/genconstants.c
In file included from ./tm.h:15,
 from /home/mrichmon/gcc-4.4-20080516/gcc/genconstants.c:31:
/home/mrichmon/gcc-4.4-20080516/gcc/config/sparc/linux.h:180:1: error:
NO_PROFILE_COUNTERS redefined
In file included from ./tm.h:9,
 from /home/mrichmon/gcc-4.4-20080516/gcc/genconstants.c:31:
/home/mrichmon/gcc-4.4-20080516/gcc/config/sparc/sparc.h:2488:1: error: this is
the location of the previous definition


-- 
   Summary: Build failure in snapshot of 05/16/08 under Sparc Linux
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: michael dot a dot richmond at nasa dot gov


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



[Bug c/36255] -fstrict-aliasing breaks __builtin_va_args

2008-05-17 Thread rguenth at gcc dot gnu dot org


--- Comment #1 from rguenth at gcc dot gnu dot org  2008-05-17 12:22 ---
Can you provide an executable testcase that abort()s if the miscompilation
happens?


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu dot
   ||org


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



[Bug c/36256] Build failure in snapshot of 05/16/08 under Sparc Linux

2008-05-17 Thread andreast at gcc dot gnu dot org


--- Comment #1 from andreast at gcc dot gnu dot org  2008-05-17 12:44 
---
Should be fixed by this one:
http://gcc.gnu.org/ml/gcc-cvs/2008-05/msg00620.html


-- 

andreast at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


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



[Bug c++/36254] wrong control reaches end of non-void function warning

2008-05-17 Thread rguenth at gcc dot gnu dot org


--- Comment #4 from rguenth at gcc dot gnu dot org  2008-05-17 12:56 ---
Confirmed.  At -O0 we have after CFG building (t1.cpp)

  # BLOCK 8
  # PRED: 5 (fallthru) 6 (fallthru) 7 (fallthru)
L6:;
  __comp_dtor  (x);
  switch (finally_tmp.3)
{
  case 1: goto L7;
  default : goto L8;
}
  # SUCC: 9 10

  # BLOCK 9
  # PRED: 8
L7:;
  return;
  # SUCC: EXIT


This would fix it.

Index: tree-eh.c
===
--- tree-eh.c   (revision 135433)
+++ tree-eh.c   (working copy)
@@ -1350,9 +1350,6 @@ decide_copy_try_finally (int ndests, tre
 {
   int f_estimate, sw_estimate;

-  if (!optimize)
-return false;
-
   /* Finally estimate N times, plus N gotos.  */
   f_estimate = estimate_num_insns (finally, eni_size_weights);
   f_estimate = (f_estimate + 1) * ndests;


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2008-05-17 12:56:06
   date||


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



[Bug testsuite/36057] [4.3/4.4 Regression] struct-layout-1_generate.c uses non-ISO C '%n$' operand number formats

2008-05-17 Thread ubizjak at gmail dot com


--- Comment #5 from ubizjak at gmail dot com  2008-05-17 13:10 ---
(In reply to comment #4)

  I saw this too.
 On cygwin.

Sigh. Patch at http://gcc.gnu.org/ml/gcc-patches/2008-05/msg01019.html.


-- 

ubizjak at gmail dot com changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |ubizjak at gmail dot com
   |dot org |
URL||http://gcc.gnu.org/ml/gcc-
   ||patches/2008-
   ||05/msg01019.html
 Status|NEW |ASSIGNED
   Last reconfirmed|2008-05-12 20:41:24 |2008-05-17 13:10:01
   date||


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



[Bug c/36255] -fstrict-aliasing breaks __builtin_va_args

2008-05-17 Thread juanjose dot garciaripoll at gmail dot com


--- Comment #2 from juanjose dot garciaripoll at gmail dot com  2008-05-17 
13:27 ---
Created an attachment (id=15649)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15649action=view)
Files for test case (simple.c 1/3)


-- 


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



[Bug c/36255] -fstrict-aliasing breaks __builtin_va_args

2008-05-17 Thread juanjose dot garciaripoll at gmail dot com


--- Comment #3 from juanjose dot garciaripoll at gmail dot com  2008-05-17 
13:28 ---
Created an attachment (id=15650)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15650action=view)
Files for test case (simple.h 2/3)


-- 


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



[Bug c/36255] -fstrict-aliasing breaks __builtin_va_args

2008-05-17 Thread juanjose dot garciaripoll at gmail dot com


--- Comment #4 from juanjose dot garciaripoll at gmail dot com  2008-05-17 
13:29 ---
Created an attachment (id=15651)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15651action=view)
Files for test case (main.c 3/3)


-- 


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



[Bug c/36255] -fstrict-aliasing breaks __builtin_va_args

2008-05-17 Thread juanjose dot garciaripoll at gmail dot com


--- Comment #5 from juanjose dot garciaripoll at gmail dot com  2008-05-17 
13:32 ---
I uploaded the program that fails if the GCC miscompiles the file simple.c
However, I had to split the test case into two different files, for otherwise
GCC inlines the offending function and the error is not produced.

I compiled the files separately, with and without -fstrict-aliasing, and it
only fails in the first case.


-- 


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



[Bug middle-end/36255] -fstrict-aliasing breaks __builtin_va_args

2008-05-17 Thread pinskia at gcc dot gnu dot org


--- Comment #6 from pinskia at gcc dot gnu dot org  2008-05-17 13:42 ---
Hmm, va_arg actually expands to use aliasing set 0.


-- 


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



[Bug target/36256] [4.4 Regression] Build failure in snapshot of 05/16/08 under Sparc Linux

2008-05-17 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

  Component|c   |target
   Keywords||build
Summary|Build failure in snapshot of|[4.4 Regression] Build
   |05/16/08 under Sparc Linux  |failure in snapshot of
   ||05/16/08 under Sparc Linux
   Target Milestone|--- |4.4.0


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



[Bug middle-end/36255] -fstrict-aliasing breaks __builtin_va_args

2008-05-17 Thread rguenth at gcc dot gnu dot org


--- Comment #7 from rguenth at gcc dot gnu dot org  2008-05-17 13:52 ---
Created an attachment (id=15652)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15652action=view)
single-file testcase


-- 


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



[Bug middle-end/36255] -fstrict-aliasing breaks __builtin_va_args

2008-05-17 Thread rguenth at gcc dot gnu dot org


--- Comment #8 from rguenth at gcc dot gnu dot org  2008-05-17 13:52 ---
Confirmed.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Keywords||wrong-code
   Last reconfirmed|-00-00 00:00:00 |2008-05-17 13:52:50
   date||


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



[Bug middle-end/36253] Caller-save stack slot may not have proper alignment

2008-05-17 Thread hjl dot tools at gmail dot com


--- Comment #2 from hjl dot tools at gmail dot com  2008-05-17 15:18 ---
A patch is posted at

http://gcc.gnu.org/ml/gcc-patches/2008-05/msg01021.html


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

URL||http://gcc.gnu.org/ml/gcc-
   ||patches/2008-
   ||05/msg01021.html
   Keywords||patch


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



[Bug fortran/36167] ICE in gfc_conv_descriptor_dimension, at fortran/trans-array.c:242

2008-05-17 Thread pault at gcc dot gnu dot org


--- Comment #2 from pault at gcc dot gnu dot org  2008-05-17 16:20 ---
(In reply to comment #1)
 Created an attachment (id=15589)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15589action=view) [edit]
 Very small code example
 
Frank,

The problem arises because of the declaration of 'u' in 'overlap_1. gfortran
declares automatic arrays to be array types in TREE-SSA.  For some reason, the
interface code in the function code is barfing when it tries to set the
dimensions of the result.  The interface is assuming that there is a descriptor
available for 'u' and this generates the ICE.  I will investigate because it is
legal code.  In the mean time, a workaround is to declare 'u' as assumed shape,
thusly:

real, intent(in), dimension(:,:,:) :: u

This forces the array to be represented as descriptor type and does not lose
anything from your code.  It also is a bit easier on the eye:)

Thanks for the report.

Paul


-- 


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



sizeof() bug with gcc version 3.4.5 (mingw-vista special r3)

2008-05-17 Thread yen-kwoon.hun
class base
{
public:
base(){};
~base(){};
};

class data : public base
{
public:
data(){};
~data(){};

private:
int member;
}__attribute__((__packed__));

class group : public base
{
public:
group(){};
~group(){};

private:
data d1;
data d2;
data d3;
} __attribute__((__packed__));

int main(int argc, char **argv)
{
std::cout  base =   sizeof(base)  std::endl;
std::cout  data =   sizeof(data)  std::endl;
std::cout  group =   sizeof(group)  std::endl;
return (0);
}


The output of the program is:
base = 1
data = 4
group = 13

The result of sizeof(group) is puzzling as it should be 12 if EBO (empty base
optimization) worked for both class data and group. Apparently EBO kicked in for
_ONLY_ one of them. If EBO didn't work at all, sizeof(group) should be 16.

Removing the extension of class base from either class group or data will cause
sizeof(group) to return 12. It seems that gcc is unable to fully apply EBO when 
a
class and its member inherits the same empty base class.

The same code had been tested on microsoft msvc compiler and realview arm
compiler, both correctly optimizes the code and give the correct value as 12.

Is this a known bug with gcc 3.4.5? I dug through the bugbase but couldn't come
up with anything. Maybe EBO isn't the problem at all.

Thanks!






[Bug fortran/36251] PUBLIC and PRIVATE abuse

2008-05-17 Thread kargl at gcc dot gnu dot org


--- Comment #4 from kargl at gcc dot gnu dot org  2008-05-17 17:50 ---
Patch submitted

http://gcc.gnu.org/ml/gcc-patches/2008-05/msg01028.html


-- 


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



[Bug fortran/36257] New: SPREAD gives wrong results with CHARACTER variables

2008-05-17 Thread fxcoudert at gcc dot gnu dot org
This one turned up during my testing of SPREAD on wide character strings, but
it turns out that it already happens on default character variables. It looks
like the front-end doesn't fill the return array descriptor well.

$ cat k2.f90
  implicit none
  character(len=5), dimension(3,3), parameter :: 
p = reshape([, , , , , , , , ], [3,3])
  character(len=5), dimension(3,3) :: m1

  m1 = p
  if (any (spread (p, 1, 2) /= spread (m1, 1, 2))) call abort

end
$ gfortran k2.f90  ./a.out 
Fortran runtime error: rank mismatch in spread()

The most amazing is that it's specific to character variables (ie it doesn't
happen with integer, for example).


-- 
   Summary: SPREAD gives wrong results with CHARACTER variables
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fxcoudert at gcc dot gnu dot org


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



[Bug middle-end/36255] -fstrict-aliasing breaks __builtin_va_args

2008-05-17 Thread rguenth at gcc dot gnu dot org


--- Comment #9 from rguenth at gcc dot gnu dot org  2008-05-17 18:03 ---
Hmm, if I properly add va_end (args) the bug is gone.


-- 


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



[Bug middle-end/36255] -fstrict-aliasing breaks __builtin_va_args

2008-05-17 Thread rguenth at gcc dot gnu dot org


--- Comment #10 from rguenth at gcc dot gnu dot org  2008-05-17 18:15 
---
Reduced testcase, works with -fno-strict-aliasing.

unsigned long __attribute__((noinline)) foo (int narg, ...)
{
  unsigned long V1;
  __builtin_va_list args;
  __builtin_va_start (args, narg);
  V1 = (unsigned long)__builtin_va_arg(args, void *);
  /*__builtin_va_end (args);*/
  return V1;
}
extern void abort (void);
int main(int argc, char**argv)
{
  unsigned long x = foo (1, 0x2688612UL);
  if (x != 0x2688612UL)
abort ();
  return 0;
}


-- 


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



[Bug middle-end/36255] -fstrict-aliasing breaks __builtin_va_args

2008-05-17 Thread rguenth at gcc dot gnu dot org


--- Comment #11 from rguenth at gcc dot gnu dot org  2008-05-17 18:21 
---
Note that the missing va_end makes the testcase strictly invalid.


-- 


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



[Bug middle-end/36255] -fstrict-aliasing breaks __builtin_va_args

2008-05-17 Thread pinskia at gcc dot gnu dot org


--- Comment #12 from pinskia at gcc dot gnu dot org  2008-05-17 18:23 
---
This is undefined code without va_end. 


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID


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



[Bug fortran/36251] PUBLIC and PRIVATE abuse

2008-05-17 Thread kargl at gcc dot gnu dot org


--- Comment #5 from kargl at gcc dot gnu dot org  2008-05-17 19:10 ---
This diff fixes the BIND(C) ice, but I haven't found a suitable location to 
emit an error message.

Index: resolve.c
===
--- resolve.c   (revision 135453)
+++ resolve.c   (working copy)
@@ -6612,10 +6612,10 @@
   has_error = 1;
 }
   else if (sym-attr.contained == 0 
-(sym-attr.if_source == IFSRC_UNKNOWN))
-if ((sym-attr.use_assoc 
-  (strcmp (bind_c_sym-mod_name, sym-module) != 0)) 
-|| sym-attr.use_assoc == 0)
+sym-attr.if_source == IFSRC_UNKNOWN)
+   if ((sym-attr.use_assoc  bind_c_sym-mod_name
+ strcmp (bind_c_sym-mod_name, sym-module) != 0) 
+   || sym-attr.use_assoc == 0)
   {
 gfc_error (Binding label '%s' at %L collides with global 
entity '%s' at %L, sym-binding_label,


-- 


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



[Bug middle-end/36253] Caller-save stack slot may not have proper alignment

2008-05-17 Thread hjl dot tools at gmail dot com


--- Comment #3 from hjl dot tools at gmail dot com  2008-05-17 23:50 ---
An updated patch is posted at

http://gcc.gnu.org/ml/gcc-patches/2008-05/msg01029.html


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

 CC||Joey dot ye at intel dot
   ||com, xuepeng dot guo at
   ||intel dot com
URL|http://gcc.gnu.org/ml/gcc-  |http://gcc.gnu.org/ml/gcc-
   |patches/2008-   |patches/2008-
   |05/msg01021.html|05/msg01029.html


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



[Bug middle-end/36253] Caller-save stack slot may not have proper alignment

2008-05-17 Thread hjl at gcc dot gnu dot org


--- Comment #4 from hjl at gcc dot gnu dot org  2008-05-17 23:58 ---
Subject: Bug 36253

Author: hjl
Date: Sat May 17 23:57:59 2008
New Revision: 135486

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=135486
Log:
2008-05-17  H.J. Lu  [EMAIL PROTECTED]

PR middle-end/36253
* caller-save.c (insert_restore): Verify alignment of spill
space.
(insert_save): Likewise.

* cfgexpand.c (LOCAL_ALIGNMENT): Removed.
(get_decl_align_unit): Pass VOIDmode to LOCAL_ALIGNMENT.

* defaults.h (LOCAL_ALIGNMENT): New. Provide default.

* function.c (LOCAL_ALIGNMENT): Removed.
(get_stack_local_alignment): New.
(assign_stack_local): Use it.  Set alignment on stack slot.
(assign_stack_temp_for_type): Use get_stack_local_alignment.

* config/bfin/bfin.c (bfin_local_alignment): Updated.
* config/bfin/bfin.h (LOCAL_ALIGNMENT): Likewise.
* config/bfin/bfin-protos.h (bfin_local_alignment): Likewise.
* config/i386/i386.h (LOCAL_ALIGNMENT): Likewise.
* config/i386/i386-protos.h (ix86_local_alignment): Likewise.
* config/mips/mips.h (LOCAL_ALIGNMENT): Likewise.
* config/mmix/mmix.c (mmix_local_alignment): Likewise.
* config/mmix/mmix.h (LOCAL_ALIGNMENT): Likewise.
* config/mmix/mmix-protos.h (mmix_local_alignment): Likewise.
* config/rs6000/rs6000.h (LOCAL_ALIGNMENT): Likewise.
* config/score/score.h (LOCAL_ALIGNMENT): Likewise.
* config/sh/sh.h (LOCAL_ALIGNMENT): Likewise.
* config/sparc/sparc.h (LOCAL_ALIGNMENT): Likewise.
* config/spu/spu.h (LOCAL_ALIGNMENT): Likewise.

* config/i386/i386.c (ix86_local_alignment): Handle caller-save
stack slot in XFmode.

* config/rs6000/rs6000.h (LOCAL_ALIGNMENT_1): New.
* config/sh/sh.h (LOCAL_ALIGNMENT_1): Likewise.

* doc/tm.texi (LOCAL_ALIGNMENT): Add mode.

Modified:
branches/stack/gcc/ChangeLog.stackalign
branches/stack/gcc/caller-save.c
branches/stack/gcc/cfgexpand.c
branches/stack/gcc/config/bfin/bfin-protos.h
branches/stack/gcc/config/bfin/bfin.c
branches/stack/gcc/config/bfin/bfin.h
branches/stack/gcc/config/i386/i386-protos.h
branches/stack/gcc/config/i386/i386.c
branches/stack/gcc/config/i386/i386.h
branches/stack/gcc/config/mips/mips.h
branches/stack/gcc/config/mmix/mmix-protos.h
branches/stack/gcc/config/mmix/mmix.c
branches/stack/gcc/config/mmix/mmix.h
branches/stack/gcc/config/rs6000/rs6000.h
branches/stack/gcc/config/score/score.h
branches/stack/gcc/config/sh/sh.h
branches/stack/gcc/config/sparc/sparc.h
branches/stack/gcc/config/spu/spu.h
branches/stack/gcc/defaults.h
branches/stack/gcc/doc/tm.texi
branches/stack/gcc/function.c


-- 


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



[Bug fortran/35184] ICE in gfc_conv_array_index_offset

2008-05-17 Thread jvdelisle at gcc dot gnu dot org


--- Comment #7 from jvdelisle at gcc dot gnu dot org  2008-05-18 00:33 
---
Subject: Bug 35184

Author: jvdelisle
Date: Sun May 18 00:32:22 2008
New Revision: 135492

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=135492
Log:
2008-05-17  Jerry DeLisle  [EMAIL PROTECTED]

Backport from mainline:
PR fortran/35184
* trans-array.c (gfc_conv_array_index_offset): Remove
unnecessary assert.

Modified:
branches/gcc-4_3-branch/gcc/fortran/ChangeLog
branches/gcc-4_3-branch/gcc/fortran/trans-array.c


-- 


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