[Bug libfortran/35863] [F2003] Implement ENCODING=UTF-8

2008-08-19 Thread burnus at gcc dot gnu dot org


--- Comment #13 from burnus at gcc dot gnu dot org  2008-08-19 06:02 ---
Subject: Bug 35863

Author: burnus
Date: Tue Aug 19 06:00:51 2008
New Revision: 139223

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=139223
Log:
2008-08-19  Tobias Burnus  [EMAIL PROTECTED]

   PR libfortran/35863
   * io/write.c (write_a_char4): Add missing variable declaration
   in HAVE_CRLF block.


Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/write.c


-- 


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



[Bug tree-optimization/31079] 20% difference between ifort/gfortran, missed vectorization

2008-08-19 Thread jv244 at cam dot ac dot uk


--- Comment #11 from jv244 at cam dot ac dot uk  2008-08-19 06:09 ---
Created an attachment (id=16095)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16095action=view)
new testcase 

This (PR31079_11.f90) should be a replacement for comment #4, and illustrates
the vectorizer issue.

 gfortran -O3 -ftree-vectorize -ffast-math -march=native PR31079_11.f90
 ./a.out
   4.0282512

 ifort -O3 -xT PR31079_11.f90
PR31079_11.f90(52): (col. 13) remark: LOOP WAS VECTORIZED.
PR31079_11.f90(52): (col. 13) remark: BLOCK WAS VECTORIZED.
PR31079_11.f90(52): (col. 13) remark: LOOP WAS VECTORIZED.
PR31079_11.f90(52): (col. 13) remark: LOOP WAS VECTORIZED.
PR31079_11.f90(17): (col. 8) remark: LOOP WAS VECTORIZED.
PR31079_11.f90(24): (col. 5) remark: BLOCK WAS VECTORIZED.
PR31079_11.f90(30): (col. 7) remark: LOOP WAS VECTORIZED.
PR31079_11.f90(31): (col. 7) remark: LOOP WAS VECTORIZED.
 ./a.out
   2.640165

The inner loop looks like:

DO i=1,N
  s(1:2)=s(1:2)+pxy(i)%a(:)*dpy(i)%a(1)
  s(3:4)=s(3:4)+pxy(i)%a(:)*dpy(i)%a(2)
ENDDO

which ifort vectorizes (I will attach the full asm):

..B3.4: # Preds ..B3.4 ..B3.3
movddup   collocate_core_2_2_0_0_$DPY.0.1(%rax), %xmm2  #30.33
movddup   8+collocate_core_2_2_0_0_$DPY.0.1(%rax), %xmm4 #31.33
movapscollocate_core_2_2_0_0_$PXY.0.1(%rax), %xmm3  #30.7
mulpd %xmm3, %xmm2  #30.32
incq  %rdx  #29.5
addq  $16, %rax #29.5
addpd %xmm2, %xmm1  #30.7
cmpq  $1000, %rdx   #29.5
mulpd %xmm3, %xmm4  #31.32
addpd %xmm4, %xmm0  #31.7
jl..B3.4# Prob 99%  #29.5


-- 


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



[Bug tree-optimization/31079] 20% difference between ifort/gfortran, missed vectorization

2008-08-19 Thread jv244 at cam dot ac dot uk


--- Comment #12 from jv244 at cam dot ac dot uk  2008-08-19 06:11 ---
Created an attachment (id=16096)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16096action=view)
ifort's asm for PR31079_11.f90 at -O3 -xT -S


-- 


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



[Bug fortran/37159] New: RANDOM_SEED: PUT= check array size at compile time

2008-08-19 Thread burnus at gcc dot gnu dot org
The run-time library has:

  static const GFC_INTEGER_4 kiss_size =
sizeof(kiss_seed)/sizeof(kiss_seed[0]);
  if (((put-dim[0].ubound + 1 - put-dim[0].lbound))  kiss_size)
runtime_error (Array size of PUT is too small.);

It would be great if the size could already be checked at compile time:

  integer size(6)
  CALL RANDOM_SEED(size=size(1))
  print *, size(1)
  CALL RANDOM_SEED(put=size)
end

$ ./a.out
   8
Fortran runtime error: Array size of PUT is too small.

Note: If HAVE_GFC_REAL_16 is set, size is larger than 8.
Vector too small for argument PUT (no. 2) of intrinsic RANDOM_SEED

NAG f95 checks things at compile time:
  Error: Vector too small for argument PUT (no. 2) of intrinsic RANDOM_SEED


-- 
   Summary: RANDOM_SEED:  PUT=  check array size at compile time
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Keywords: diagnostic
  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=37159



[Bug bootstrap/37152] tree-vect-transform.c: use of = where == may have been intended

2008-08-19 Thread dorit at gcc dot gnu dot org


--- Comment #2 from dorit at gcc dot gnu dot org  2008-08-19 07:15 ---
Subject: Bug 37152

Author: dorit
Date: Tue Aug 19 07:14:26 2008
New Revision: 139224

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=139224
Log:
PR bootstrap/37152
* tree-vect-transform.c (vect_create_epilog_for_reduction): Change =
to == in assert statement.
(vectorizable_reduction): Fix typo.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-vect-transform.c


-- 


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



[Bug debug/37156] [4.3 Regression] Hang with -g -O2 (or higher) (discovered with malloc.c in sqlite3)

2008-08-19 Thread jakub at gcc dot gnu dot org


--- Comment #6 from jakub at gcc dot gnu dot org  2008-08-19 07:42 ---
Related to PR36811, except in a different routine.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
   |dot org |
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2008-08-19 07:42:50
   date||
Summary|Hang with -g -O2 (or higher)|[4.3 Regression] Hang with -
   |(discovered with malloc.c in|g -O2 (or higher)
   |sqlite3)|(discovered with malloc.c in
   ||sqlite3)
   Target Milestone|--- |4.3.2


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



[Bug target/37158] Wrong insn for _mm_comieq_sd

2008-08-19 Thread Joey dot ye at intel dot com


--- Comment #1 from Joey dot ye at intel dot com  2008-08-19 08:19 ---
Check out such code in i386.c:
/* Figure out whether to use ordered or unordered fp comparisons.
   Return the appropriate mode to use.  */

enum machine_mode
ix86_fp_compare_mode (enum rtx_code code ATTRIBUTE_UNUSED)
{
  /* ??? In order to make all comparisons reversible, we do all comparisons
 non-trapping when compiling for IEEE.  Once gcc is able to distinguish
 all forms trapping and nontrapping comparisons, we can make inequality
 comparisons trapping again, since it results in better code when using
 FCOM based compares.  */
  return TARGET_IEEE_FP ? CCFPUmode : CCFPmode;
}


-- 

Joey dot ye at intel dot com changed:

   What|Removed |Added

Summary| Wrong insn for |Wrong insn for _mm_comieq_sd
   |_mm_comieq_sd   |


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



[Bug bootstrap/37155] [4.4 Regression] Revision 139207 failed to bootstrap on Linux/ia64

2008-08-19 Thread rguenth at gcc dot gnu dot org


--- Comment #3 from rguenth at gcc dot gnu dot org  2008-08-19 08:38 ---
Confirmed.  Non-bootstrapped it fails to build 177.mesa for example.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu dot
   ||org
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2008-08-19 08:38:41
   date||
   Target Milestone|--- |4.4.0


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



[Bug tree-optimization/35972] [4.4 Regression] load-PRE missed opportunities without SFTs

2008-08-19 Thread rguenth at gcc dot gnu dot org


--- Comment #11 from rguenth at gcc dot gnu dot org  2008-08-19 09:07 
---
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=35972



[Bug tree-optimization/23094] store ccp, or store copy prop misses an optimization

2008-08-19 Thread rguenth at gcc dot gnu dot org


--- Comment #12 from rguenth at gcc dot gnu dot org  2008-08-19 09:08 
---
Subject: Bug 23094

Author: rguenth
Date: Tue Aug 19 09:06:54 2008
New Revision: 139226

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=139226
Log:
2008-08-19  Richard Guenther  [EMAIL PROTECTED]

PR tree-optimization/35972
PR tree-optimization/23094
* tree-ssa-sccvn.h (vn_reference_lookup_pieces): Add maywalk
parameter.
* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Properly
handle MISALIGNED_INDIRECT_REF.
(get_ref_from_reference_ops): New helper.
(vn_reference_lookup_pieces): Walk the use-def chain using the
alias-oracle if requested.
* tree-ssa-pre.c (phi_translate_1): Do reference lookup with
walking the use-def chain.
(compute_avail): But not here.
(create_component_ref_by_pieces_1): Properly handle
MISALIGNED_INDIRECT_REF.
(do_regular_insertion): Handle fully redundant
expressions after PHI-translation also for SSA_NAME values, not
only constants.  Correctly use edoubleprime for that.

* gcc.dg/tree-ssa/ssa-pre-19.c: New testcase.
* gcc.dg/autopar/reduc-1.c: Move constant initialized arrays to
global memory.
* gcc.dg/autopar/reduc-1char.c: Likewise.
* gcc.dg/autopar/reduc-1short.c: Likewise.
* gcc.dg/autopar/reduc-2.c: Likewise.
* gcc.dg/autopar/reduc-2char.c: Likewise.
* gcc.dg/autopar/reduc-2short.c: Likewise.
* gcc.dg/autopar/reduc-3.c: Likewise.
* gcc.dg/tree-ssa/ifc-20040816-1.c: Likewise.
* gcc.dg/vect/costmodel/i386/costmodel-vect-reduc-1char.c: Likewise.
* gcc.dg/vect/costmodel/x86_64/costmodel-vect-reduc-1char.c: Likewise.
* gcc.dg/vect/fast-math-vect-reduc-5.c: Likewise.
* gcc.dg/vect/fast-math-vect-reduc-7.c: Likewise.
* gcc.dg/vect/no-trapping-math-2.c: Likewise.
* gcc.dg/vect/no-trapping-math-vect-111.c: Likewise.
* gcc.dg/vect/no-trapping-math-vect-ifcvt-11.c: Likewise.
* gcc.dg/vect/no-trapping-math-vect-ifcvt-12.c: Likewise.
* gcc.dg/vect/no-trapping-math-vect-ifcvt-13.c: Likewise.
* gcc.dg/vect/no-trapping-math-vect-ifcvt-14.c: Likewise.
* gcc.dg/vect/no-trapping-math-vect-ifcvt-15.c: Likewise.
* gcc.dg/vect/no-vfa-vect-37.c: Likewise.
* gcc.dg/vect/no-vfa-vect-depend-1.c: Likewise.
* gcc.dg/vect/pr18400.c: Likewise.
* gcc.dg/vect/slp-12b.c: Likewise.
* gcc.dg/vect/slp-14.c: Likewise.
* gcc.dg/vect/slp-7.c: Likewise.
* gcc.dg/vect/slp-15.c: Likewise.
* gcc.dg/vect/slp-16.c: Likewise.
* gcc.dg/vect/slp-17.c: Likewise.
* gcc.dg/vect/slp-24.c: Likewise.
* gcc.dg/vect/slp-28.c: Likewise.
* gcc.dg/vect/slp-3.c: Likewise.
* gcc.dg/vect/slp-34.c: Likewise.
* gcc.dg/vect/slp-6.c: Likewise.
* gcc.dg/vect/slp-8.c: Likewise.
* gcc.dg/vect/vect-107.c: Likewise.
* gcc.dg/vect/vect-108.c: Likewise.
* gcc.dg/vect/vect-11.c: Likewise.
* gcc.dg/vect/vect-112.c: Likewise.
* gcc.dg/vect/vect-115.c: Likewise.
* gcc.dg/vect/vect-11a.c: Likewise.
* gcc.dg/vect/vect-34.c: Likewise.
* gcc.dg/vect/vect-9.c: Likewise.
* gcc.dg/vect/vect-97.c: Likewise.
* gcc.dg/vect/vect-align-1.c: Likewise.
* gcc.dg/vect/vect-float-extend-1.c: Likewise.
* gcc.dg/vect/vect-floatint-conversion-1.c: Likewise.
* gcc.dg/vect/vect-ifcvt-16.c: Likewise.
* gcc.dg/vect/vect-ifcvt-17.c: Likewise.
* gcc.dg/vect/vect-ifcvt-2.c: Likewise.
* gcc.dg/vect/vect-ifcvt-3.c: Likewise.
* gcc.dg/vect/vect-ifcvt-4.c: Likewise.
* gcc.dg/vect/vect-ifcvt-5.c: Likewise.
* gcc.dg/vect/vect-ifcvt-6.c: Likewise.
* gcc.dg/vect/vect-ifcvt-7.c: Likewise.
* gcc.dg/vect/vect-intfloat-conversion-1.c: Likewise.
* gcc.dg/vect/vect-intfloat-conversion-2.c: Likewise.
* gcc.dg/vect/vect-intfloat-conversion-3.c: Likewise.
* gcc.dg/vect/vect-intfloat-conversion-4a.c: Likewise.
* gcc.dg/vect/vect-intfloat-conversion-4b.c: Likewise.
* gcc.dg/vect/vect-multitypes-2.c: Likewise.
* gcc.dg/vect/vect-multitypes-5.c: Likewise.
* gcc.dg/vect/vect-reduc-1.c: Likewise.
* gcc.dg/vect/vect-reduc-1char.c: Likewise.
* gcc.dg/vect/vect-reduc-1short.c: Likewise.
* gcc.dg/vect/vect-reduc-2.c: Likewise.
* gcc.dg/vect/vect-reduc-3.c: Likewise.
* gcc.dg/vect/vect-shift-1.c: Likewise.
* gcc.dg/vect/vect-strided-float.c: Likewise.
* gcc.dg/vect/vect-strided-store-u32-i2.c: Likewise.
* gcc.dg/vect/wrapv-vect-reduc-2char.c: Likewise.
* gcc.dg/vect/wrapv-vect-reduc-2short.c: Likewise.
* gcc.dg/tree-ssa/gen-vect-11.c: Likewise.
* gcc.dg/tree-ssa/gen-vect-11a.c: Likewise.

[Bug tree-optimization/35972] [4.4 Regression] load-PRE missed opportunities without SFTs

2008-08-19 Thread rguenth at gcc dot gnu dot org


--- Comment #12 from rguenth at gcc dot gnu dot org  2008-08-19 09:08 
---
Subject: Bug 35972

Author: rguenth
Date: Tue Aug 19 09:06:54 2008
New Revision: 139226

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=139226
Log:
2008-08-19  Richard Guenther  [EMAIL PROTECTED]

PR tree-optimization/35972
PR tree-optimization/23094
* tree-ssa-sccvn.h (vn_reference_lookup_pieces): Add maywalk
parameter.
* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Properly
handle MISALIGNED_INDIRECT_REF.
(get_ref_from_reference_ops): New helper.
(vn_reference_lookup_pieces): Walk the use-def chain using the
alias-oracle if requested.
* tree-ssa-pre.c (phi_translate_1): Do reference lookup with
walking the use-def chain.
(compute_avail): But not here.
(create_component_ref_by_pieces_1): Properly handle
MISALIGNED_INDIRECT_REF.
(do_regular_insertion): Handle fully redundant
expressions after PHI-translation also for SSA_NAME values, not
only constants.  Correctly use edoubleprime for that.

* gcc.dg/tree-ssa/ssa-pre-19.c: New testcase.
* gcc.dg/autopar/reduc-1.c: Move constant initialized arrays to
global memory.
* gcc.dg/autopar/reduc-1char.c: Likewise.
* gcc.dg/autopar/reduc-1short.c: Likewise.
* gcc.dg/autopar/reduc-2.c: Likewise.
* gcc.dg/autopar/reduc-2char.c: Likewise.
* gcc.dg/autopar/reduc-2short.c: Likewise.
* gcc.dg/autopar/reduc-3.c: Likewise.
* gcc.dg/tree-ssa/ifc-20040816-1.c: Likewise.
* gcc.dg/vect/costmodel/i386/costmodel-vect-reduc-1char.c: Likewise.
* gcc.dg/vect/costmodel/x86_64/costmodel-vect-reduc-1char.c: Likewise.
* gcc.dg/vect/fast-math-vect-reduc-5.c: Likewise.
* gcc.dg/vect/fast-math-vect-reduc-7.c: Likewise.
* gcc.dg/vect/no-trapping-math-2.c: Likewise.
* gcc.dg/vect/no-trapping-math-vect-111.c: Likewise.
* gcc.dg/vect/no-trapping-math-vect-ifcvt-11.c: Likewise.
* gcc.dg/vect/no-trapping-math-vect-ifcvt-12.c: Likewise.
* gcc.dg/vect/no-trapping-math-vect-ifcvt-13.c: Likewise.
* gcc.dg/vect/no-trapping-math-vect-ifcvt-14.c: Likewise.
* gcc.dg/vect/no-trapping-math-vect-ifcvt-15.c: Likewise.
* gcc.dg/vect/no-vfa-vect-37.c: Likewise.
* gcc.dg/vect/no-vfa-vect-depend-1.c: Likewise.
* gcc.dg/vect/pr18400.c: Likewise.
* gcc.dg/vect/slp-12b.c: Likewise.
* gcc.dg/vect/slp-14.c: Likewise.
* gcc.dg/vect/slp-7.c: Likewise.
* gcc.dg/vect/slp-15.c: Likewise.
* gcc.dg/vect/slp-16.c: Likewise.
* gcc.dg/vect/slp-17.c: Likewise.
* gcc.dg/vect/slp-24.c: Likewise.
* gcc.dg/vect/slp-28.c: Likewise.
* gcc.dg/vect/slp-3.c: Likewise.
* gcc.dg/vect/slp-34.c: Likewise.
* gcc.dg/vect/slp-6.c: Likewise.
* gcc.dg/vect/slp-8.c: Likewise.
* gcc.dg/vect/vect-107.c: Likewise.
* gcc.dg/vect/vect-108.c: Likewise.
* gcc.dg/vect/vect-11.c: Likewise.
* gcc.dg/vect/vect-112.c: Likewise.
* gcc.dg/vect/vect-115.c: Likewise.
* gcc.dg/vect/vect-11a.c: Likewise.
* gcc.dg/vect/vect-34.c: Likewise.
* gcc.dg/vect/vect-9.c: Likewise.
* gcc.dg/vect/vect-97.c: Likewise.
* gcc.dg/vect/vect-align-1.c: Likewise.
* gcc.dg/vect/vect-float-extend-1.c: Likewise.
* gcc.dg/vect/vect-floatint-conversion-1.c: Likewise.
* gcc.dg/vect/vect-ifcvt-16.c: Likewise.
* gcc.dg/vect/vect-ifcvt-17.c: Likewise.
* gcc.dg/vect/vect-ifcvt-2.c: Likewise.
* gcc.dg/vect/vect-ifcvt-3.c: Likewise.
* gcc.dg/vect/vect-ifcvt-4.c: Likewise.
* gcc.dg/vect/vect-ifcvt-5.c: Likewise.
* gcc.dg/vect/vect-ifcvt-6.c: Likewise.
* gcc.dg/vect/vect-ifcvt-7.c: Likewise.
* gcc.dg/vect/vect-intfloat-conversion-1.c: Likewise.
* gcc.dg/vect/vect-intfloat-conversion-2.c: Likewise.
* gcc.dg/vect/vect-intfloat-conversion-3.c: Likewise.
* gcc.dg/vect/vect-intfloat-conversion-4a.c: Likewise.
* gcc.dg/vect/vect-intfloat-conversion-4b.c: Likewise.
* gcc.dg/vect/vect-multitypes-2.c: Likewise.
* gcc.dg/vect/vect-multitypes-5.c: Likewise.
* gcc.dg/vect/vect-reduc-1.c: Likewise.
* gcc.dg/vect/vect-reduc-1char.c: Likewise.
* gcc.dg/vect/vect-reduc-1short.c: Likewise.
* gcc.dg/vect/vect-reduc-2.c: Likewise.
* gcc.dg/vect/vect-reduc-3.c: Likewise.
* gcc.dg/vect/vect-shift-1.c: Likewise.
* gcc.dg/vect/vect-strided-float.c: Likewise.
* gcc.dg/vect/vect-strided-store-u32-i2.c: Likewise.
* gcc.dg/vect/wrapv-vect-reduc-2char.c: Likewise.
* gcc.dg/vect/wrapv-vect-reduc-2short.c: Likewise.
* gcc.dg/tree-ssa/gen-vect-11.c: Likewise.
* gcc.dg/tree-ssa/gen-vect-11a.c: Likewise.

[Bug tree-optimization/23094] store ccp, or store copy prop misses an optimization

2008-08-19 Thread rguenth at gcc dot gnu dot org


--- Comment #13 from rguenth at gcc dot gnu dot org  2008-08-19 09:10 
---
Testcase in comment #10 is fixed.  For the original testcase (and the
copyprop variant) I still have a SCCVN patch pending.


-- 


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



[Bug middle-end/37150] vectorizer issue

2008-08-19 Thread jv244 at cam dot ac dot uk


--- Comment #4 from jv244 at cam dot ac dot uk  2008-08-19 10:53 ---
(In reply to comment #2)

 Note that the first complete unrolling pass unrolls loops that result in
 smaller code.  This interferes with vectorization in your case, so can
 you try

unfortunately, the patch below doesn't apply to trunk anymore. I applied it by
hand, and get similar improvements like the ones observed by Tobias.
Ifort: 1.54s
Gfortran (unpatched) : 3.30s
Gfortran (patched)   : 1.94s


-- 


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



[Bug c++/36741] [4.3/4.4 regression] Bogus large integer implicitly truncated passing size_t constant to new

2008-08-19 Thread dodji at gcc dot gnu dot org


--- Comment #10 from dodji at gcc dot gnu dot org  2008-08-19 11:00 ---
Created an attachment (id=16097)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16097action=view)
5th patch

This patch makes sure the integer type used in the conversion to a zero
extended unsigned integral has a precision that is high enough.

regtested on x86_64.


-- 

dodji at gcc dot gnu dot org changed:

   What|Removed |Added

  Attachment #16060|0   |1
is obsolete||
  Attachment #16083|0   |1
is obsolete||


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



[Bug middle-end/37150] vectorizer issue

2008-08-19 Thread jv244 at cam dot ac dot uk


--- Comment #5 from jv244 at cam dot ac dot uk  2008-08-19 11:36 ---
Created an attachment (id=16098)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16098action=view)
ifort asm

added the ifort asm. The remaining difference seems to be related to how data
is being loaded in the registers


-- 


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



[Bug debug/37156] [4.3 Regression] Hang with -g -O2 (or higher) (discovered with malloc.c in sqlite3)

2008-08-19 Thread jakub at gcc dot gnu dot org


--- Comment #7 from jakub at gcc dot gnu dot org  2008-08-19 11:46 ---
Subject: Bug 37156

Author: jakub
Date: Tue Aug 19 11:44:42 2008
New Revision: 139230

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=139230
Log:
PR debug/37156
* pretty-print.c (pp_base_format): Deal with recursive BLOCK trees.
* tree.c (block_nonartificial_location): Likewise.

* error.c (cp_print_error_function): Deal with recursive BLOCK trees.

* gcc.dg/pr37156.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/pr37156.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/error.c
trunk/gcc/pretty-print.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree.c


-- 


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



[Bug debug/37156] [4.3 Regression] Hang with -g -O2 (or higher) (discovered with malloc.c in sqlite3)

2008-08-19 Thread jakub at gcc dot gnu dot org


--- Comment #8 from jakub at gcc dot gnu dot org  2008-08-19 11:51 ---
Subject: Bug 37156

Author: jakub
Date: Tue Aug 19 11:50:11 2008
New Revision: 139231

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=139231
Log:
PR debug/37156
* pretty-print.c (pp_base_format): Deal with recursive BLOCK trees.
* tree.c (block_nonartificial_location): Likewise.

* error.c (cp_print_error_function): Deal with recursive BLOCK trees.

* gcc.dg/pr37156.c: New test.

Added:
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/pr37156.c
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/cp/ChangeLog
branches/gcc-4_3-branch/gcc/cp/error.c
branches/gcc-4_3-branch/gcc/pretty-print.c
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
branches/gcc-4_3-branch/gcc/tree.c


-- 


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



[Bug debug/37156] [4.3 Regression] Hang with -g -O2 (or higher) (discovered with malloc.c in sqlite3)

2008-08-19 Thread jakub at gcc dot gnu dot org


--- Comment #9 from jakub at gcc dot gnu dot org  2008-08-19 11:52 ---
Fixed.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug libstdc++/37160] New: Handling of badly formatted double

2008-08-19 Thread jm at bourguet dot org
The following program:

#include iostream
#include sstream
#include istream
#include ostream
#include string
#include stdio.h
#include errno.h

int main(int argc, char* argv[]) {
++argv;
for (; *argv != 0; ++argv) {
std::cout  Input: |  *argv  |\n;
std::istringstream is(*argv);
double d = 0;
is  d;
if (!is) {
if (is.fail()) std::coutfail() after is  d\n;
if (is.eof())  std::couteof()  after is  d\n;
if (is.bad())  std::coutbad()  after is  d\n;
is.clear();
}
std::cout d -   d  '\n';
std::string s;
if (std::getline(is, s)) {
std::coutstill to read: |  s  |\n;
} else {
if (is.fail()) std::coutfail() after getline(is, s)\n;
if (is.eof())  std::couteof()  after getline(is, s)\n;
if (is.bad())  std::coutbad()  after getline(is, s)\n;
}
}
}

compiled with g++ 4.2.4 on Linux (I've tried also various other versions on
Linux and Solaris, they all had the same behavior) has the following result:
 ./a.out 1.e x 1.e+ x 1.e.e. x
Input: |1.e x|
   d - 1
  still to read: | x|
Input: |1.e+ x|
   d - 1
  still to read: | x|
Input: |1.e.e. x|
   d - 1
  still to read: |.e. x|

I'd have expected either a failure and consuming the badly formed double, or a
success and the first e remaining in the input.  I've tried the same program
with Sun CC on Linux and Solaris and with IBM xlC, I get the first behavior I
expected:
 ./a.out 1.e x 1.e+ x 1.e.e. x
Input: |1.e x|
  fail() after is  d
   d - 0
  still to read: | x|
Input: |1.e+ x|
  fail() after is  d
   d - 0
  still to read: | x|
Input: |1.e.e. x|
  fail() after is  d
   d - 0
  still to read: |.e. x|


-- 
   Summary: Handling of badly formatted double
   Product: gcc
   Version: 4.2.4
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jm at bourguet dot org


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



[Bug target/37157] [4.4 Regression] Wrong insn for _mm_unpackhi_epi64

2008-08-19 Thread hjl at gcc dot gnu dot org


--- Comment #2 from hjl at gcc dot gnu dot org  2008-08-19 12:50 ---
Subject: Bug 37157

Author: hjl
Date: Tue Aug 19 12:49:28 2008
New Revision: 139232

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=139232
Log:
gcc/

2008-08-19  H.J. Lu  [EMAIL PROTECTED]

PR target/37157
* config/i386/sse.md (sse2_punpckhqdq, sse2_punpcklqdq): Moved
before (sse2_shufpd_mode).

gcc/testsuite/

2008-08-19  H.J. Lu  [EMAIL PROTECTED]

PR target/37157
* gcc.target/i386/sse2-unpack-1.c: New.

Added:
trunk/gcc/testsuite/gcc.target/i386/sse2-unpack-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/sse.md
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug tree-optimization/31079] 20% difference between ifort/gfortran, missed vectorization

2008-08-19 Thread jv244 at cam dot ac dot uk


--- Comment #13 from jv244 at cam dot ac dot uk  2008-08-19 13:31 ---
(In reply to comment #11)

 This (PR31079_11.f90) should be a replacement for comment #4, and illustrates
 the vectorizer issue.

The patch Richard posted in PR37150 also improves this PR31079_11.f90 testcase
a lot:

ifort   : 2.54
gfortran (unpatched): 4.00
gfortran (patched)  : 2.96


-- 


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



[Bug c++/11078] [ABI] decltype(T()) doesn't work

2008-08-19 Thread aldot at gcc dot gnu dot org


--- Comment #29 from aldot at gcc dot gnu dot org  2008-08-19 13:43 ---
4.3.1 and later give:

GNU C++ (Debian 4.3.1-8) version 4.3.1 (i486-linux-gnu)
compiled by GNU C version 4.3.1, GMP version 4.2.2, MPFR version 2.3.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 1a96b3b5ffa5cfd9037de3acec5e6692
known.C: In instantiation of ‘__typeof__ ((T1() + T2())) add(T1, T2) [with T1 =
double, T2 = char]’:
known.C:3:   instantiated from here
known.C:2: sorry, unimplemented: mangling typeof, use decltype instead


-- 

aldot at gcc dot gnu dot org changed:

   What|Removed |Added

  Known to work||4.3.1


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



[Bug libstdc++/37160] Handling of badly formatted double

2008-08-19 Thread jm at bourguet dot org


--- Comment #1 from jm at bourguet dot org  2008-08-19 13:45 ---
I had tested with previous versions.  I've just tested with g++ 4.3.1, it has
the same behaviour as previous g++ versions.


-- 


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



[Bug middle-end/37150] vectorizer issue

2008-08-19 Thread jv244 at cam dot ac dot uk


--- Comment #6 from jv244 at cam dot ac dot uk  2008-08-19 13:50 ---
Created an attachment (id=16099)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16099action=view)
non-reduced testcase

unfortunately, on the non-reduced testcase (attached as collocate_fast_2.f90)
the vectorization does not trigger :-(

I guess that this is due to the more complex loop structure ? It would be
really great if this could be made to work.


-- 


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



[Bug middle-end/37161] New: [4.4 Regression]: Revision 139225 caused gfortran.dg/vect/pr33301.f -O

2008-08-19 Thread hjl dot tools at gmail dot com
On Linux/ia32, I saw

Running target unix/-m32
FAIL: gfortran.dg/vect/pr33301.f  -O  (internal compiler error)
FAIL: gfortran.dg/vect/pr33301.f  -O  (test for excess errors)


-- 
   Summary: [4.4 Regression]: Revision 139225 caused
gfortran.dg/vect/pr33301.f  -O
   Product: gcc
   Version: 4.4.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=37161



[Bug tree-optimization/29738] Missed constant propagation into loops

2008-08-19 Thread rguenth at gcc dot gnu dot org


--- Comment #12 from rguenth at gcc dot gnu dot org  2008-08-19 15:02 
---
Disabled/xfailed with

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=139234
Log:
2008-08-19  Richard Guenther  [EMAIL PROTECTED]

* passes.c (init_optimization_passes): Exchange store-ccp
with a ccp pass.

* gcc.dg/tree-ssa/ssa-ccp-14.c: XFAIL.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Severity|normal  |enhancement
 Status|RESOLVED|REOPENED
   Keywords||xfail
 Resolution|FIXED   |
   Target Milestone|4.3.0   |---


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



[Bug tree-optimization/29738] Missed constant propagation into loops

2008-08-19 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|rakdver at gcc dot gnu dot  |unassigned at gcc dot gnu
   |org |dot org
 Status|REOPENED|NEW


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



[Bug bootstrap/37155] [4.4 Regression] Revision 139207 failed to bootstrap on Linux/ia64

2008-08-19 Thread matz at gcc dot gnu dot org


--- Comment #4 from matz at gcc dot gnu dot org  2008-08-19 15:14 ---
HARD_REGNO_MODE_OK doesn't accept reg 328, but it should as demonstrated here.
Potential patch for this at
http://gcc.gnu.org/ml/gcc-patches/2008-08/msg01289.html .


-- 


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



[Bug target/37162] New: [4.4 Regression] gcc.c-torture/compile/20020120-1.c fails with ICE on -O[23s]

2008-08-19 Thread eric dot weddington at atmel dot com
gcc.c-torture/compile/20020120-1.c fails with ICE on -O[23s] and gives
segfault. It is known to fail on trunk revision 139231. Test is known
successful on trunk revision 139194.


-- 
   Summary: [4.4 Regression] gcc.c-torture/compile/20020120-1.c
fails with ICE on -O[23s]
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: eric dot weddington at atmel dot com
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: avr-*-*


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



[Bug tree-optimization/37021] Fortran Complex reduction / multiplication not vectorized

2008-08-19 Thread rguenth at gcc dot gnu dot org


--- Comment #2 from rguenth at gcc dot gnu dot org  2008-08-19 15:29 ---
3) is because data-ref requires a constant step

  else if (!simple_iv (loop, stmt, poffset, offset_iv, false))
{
  if (dump_file  (dump_flags  TDF_DETAILS))
fprintf (dump_file, failed: evolution of offset is not affine.\n);
  return;

but the step is (unnamed-signed:64) ((unnamed-unsigned:64) stride.3_36 *
16)

as we are dealing with general incoming arrays which are arbitrary striped.
Fixing this requires for example versioning for a constant stride.


-- 


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



[Bug target/37163] New: [4.4 Regression] gcc.c-torture/compile/pr32606.c fails with ICE on -O[23s]

2008-08-19 Thread eric dot weddington at atmel dot com
gcc.c-torture/compile/pr32606.c fails with ICE on -Os and gives
segfault. It is known to fail on trunk revision 139231. Test is known
successful on trunk revision 139194.


-- 
   Summary: [4.4 Regression] gcc.c-torture/compile/pr32606.c fails
with ICE on -O[23s]
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: eric dot weddington at atmel dot com
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: avr-*-*


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



[Bug target/37157] [4.4 Regression] Wrong insn for _mm_unpackhi_epi64

2008-08-19 Thread hjl dot tools at gmail dot com


--- Comment #3 from hjl dot tools at gmail dot com  2008-08-19 15:48 ---
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=37157



[Bug target/37164] New: [4.4 Regression] gcc.c-torture/execute/ieee/fp-cmp-4.c fails with ICE on -O3

2008-08-19 Thread eric dot weddington at atmel dot com
gcc.c-torture/execute/ieee/fp-cmp-4.c fails with ICE on -O3 and gives
segfault. It is known to fail on trunk revision 139231. Test is known
successful on trunk revision 139194.


-- 
   Summary: [4.4 Regression] gcc.c-torture/execute/ieee/fp-cmp-4.c
fails with ICE on -O3
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: eric dot weddington at atmel dot com
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: avr-*-*


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



[Bug middle-end/37165] New: [4.4 Regression] FAIL: gcc.dg/matrix/matrix-1.c scan-ipa-dump-times matrix-reorg Flattened 3 dimensions 1

2008-08-19 Thread eric dot weddington at atmel dot com
FAIL: gcc.dg/matrix/matrix-1.c scan-ipa-dump-times matrix-reorg Flattened 3
dimensions 1. Known to fail on trunk revision 139177. Known to succeed on
trunk revision 139150.

Output file only shows Flattened 2 dimensions, not 3.


-- 
   Summary: [4.4 Regression] FAIL: gcc.dg/matrix/matrix-1.c scan-
ipa-dump-times matrix-reorg Flattened 3 dimensions 1
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: eric dot weddington at atmel dot com
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: avr-*-*


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



[Bug middle-end/37165] [4.4 Regression] FAIL: gcc.dg/matrix/matrix-1.c scan-ipa-dump-times matrix-reorg Flattened 3 dimensions 1

2008-08-19 Thread eric dot weddington at atmel dot com


--- Comment #1 from eric dot weddington at atmel dot com  2008-08-19 16:16 
---
Created an attachment (id=16100)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16100action=view)
Output file of the test case.


-- 


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



[Bug bootstrap/37155] [4.4 Regression] Revision 139207 failed to bootstrap on Linux/ia64

2008-08-19 Thread hjl dot tools at gmail dot com


--- Comment #5 from hjl dot tools at gmail dot com  2008-08-19 16:23 ---
(In reply to comment #4)
 HARD_REGNO_MODE_OK doesn't accept reg 328, but it should as demonstrated here.
 Potential patch for this at
 http://gcc.gnu.org/ml/gcc-patches/2008-08/msg01289.html .
 

It doesn't solve the problem completely. I can bootstrap gcc. But I got

[EMAIL PROTECTED] gcc]$ /export/build/gnu/gcc/build-ia64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-ia64-linux/gcc/   -O1  -w -fno-show-column -c  -o
pr19357.o
/net/gnu-13/export/gnu/src/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/pr19357.c
/net/gnu-13/export/gnu/src/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/pr19357.c:
In function ‘ftest’:
/net/gnu-13/export/gnu/src/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/pr19357.c:6:
internal compiler error: in gen_rtx_SUBREG, at emit-rtl.c:777
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.


-- 


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



[Bug libstdc++/37160] Handling of badly formatted double

2008-08-19 Thread paolo dot carlini at oracle dot com


--- Comment #2 from paolo dot carlini at oracle dot com  2008-08-19 17:49 
---


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


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE


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



[Bug libstdc++/32422] Problem reading floats with exponent marker but no exponent

2008-08-19 Thread paolo dot carlini at oracle dot com


--- Comment #2 from paolo dot carlini at oracle dot com  2008-08-19 17:49 
---
*** Bug 37160 has been marked as a duplicate of this bug. ***


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

 CC||jm at bourguet dot org


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



[Bug c++/11078] [ABI] decltype(T()) doesn't work

2008-08-19 Thread paolo dot carlini at oracle dot com


--- Comment #30 from paolo dot carlini at oracle dot com  2008-08-19 17:52 
---
Yes, this can be considered fixed.


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug tree-optimization/37166] New: variable is still committed to stack even though it is not aliased

2008-08-19 Thread pinskia at gcc dot gnu dot org
Testcase:
struct f { int a; };


int g(struct f *b, struct f *c)
{
  struct f g;
  if (!b) {
b = g;
b-a = c-a + 1;
c-a = c-a + 1;
  }
  else if (!c) {
c = g;
c-a = b-a + 1;
b-a = b-a + 1;
  }
  return c-a + b-a;
}
--- CUT ---
After some changes on the trunk, we get:
bb 2:
  if (b == 0B)
goto bb 3;
  else
goto bb 4;

bb 3:
  g.a = [plus_expr] c-a + 1;
  prephitmp.13 = c-a + 1;
  c-a = prephitmp.13;
  prephitmp.25 = g.a;
  goto bb 7;

bb 4:
  if (c == 0B)
goto bb 6;
  else
goto bb 5;

bb 5:
  prephitmp.13 = c-a;
  prephitmp.25 = b-a;
  goto bb 7;

bb 6:
  g.a = [plus_expr] b-a + 1;
  prephitmp.25 = b-a + 1;
  b-a = prephitmp.25;
  prephitmp.13 = g.a;

bb 7:
  return prephitmp.25 + prephitmp.13;

--- CUT ---
Notice how g.a is still referenced.  This comes from 
  # b_1 = PHI g(3), b_3(D)(7), b_3(D)(5)

Being in the IR after PRE even though b_1 is no longer referenced.
So for 32bit PPC we get a stack adjustment:
stwu %r1,-32(%r1)
..
addi %r1,%r1,32

Even though there is no need for this adjustment as nothing touches the stack
but the variable g is still being marked with TREE_ADDRESSABLE as evident by:
Partition 0: size 4 align 4
g, offset 0
in the .expand dump.


-- 
   Summary: variable is still committed to stack even though it is
not aliased
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Keywords: missed-optimization
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org


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



[Bug preprocessor/7263] __extension__ keyword doesn't suppress warning on LL or ULL constants

2008-08-19 Thread tromey at gcc dot gnu dot org


--- Comment #17 from tromey at gcc dot gnu dot org  2008-08-19 19:28 ---
Maybe libcpp could have a mode where it also recognizes the __extension__
token?


-- 


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



[Bug tree-optimization/37166] variable is still committed to stack even though it is not aliased

2008-08-19 Thread rguenth at gcc dot gnu dot org


--- Comment #1 from rguenth at gcc dot gnu dot org  2008-08-19 19:31 ---
Confirmed.  After PRE is the last time we recompute aliasing (and the set
of addressable vars).


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu dot
   ||org
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2008-08-19 19:31:28
   date||


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



[Bug preprocessor/7263] __extension__ keyword doesn't suppress warning on LL or ULL constants

2008-08-19 Thread manu at gcc dot gnu dot org


--- Comment #18 from manu at gcc dot gnu dot org  2008-08-19 19:50 ---
(In reply to comment #17)
 Maybe libcpp could have a mode where it also recognizes the __extension__
 token?

It would definitely need to recognize __extension__. But it doesn't seem easy
to implement this. If we make it apply just to the next token, we would need to
reset it just after lexing the token after the next.

For example, the C front-end asks CPP for next token. It is __extension__ so
CPP disables pedantic and returns it to the front-end. C front-end asks for
another token. It is 0x1b27da572ef3cd86ULL. We cannot reset pedantic here
because after getting the token, the C front-end may call CPP for further
analysis (e.g., cpp_classify_number). We would have to wait for the front-end
to ask for yet another token and then reset pedantic.

Should the diagnostics in cpp_classify_number really be given by CPP? If so,
why cpp_classify_number is not called by CPP itself?


-- 


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



[Bug c++/37167] New: C++ gives bogus error message (aliased to undefined symbol)

2008-08-19 Thread sje at cup dot hp dot com
This seems to be caused by the unit-at-a-time changes, the following program
compiled cleanly with -O2 at version 138139 but gives an error message when
compiled (with -O2) at version 138140.  I found it on IA64 HP-UX but was able
to reproduce it on x86_64 Linux.

class A { };
class B : public virtual A { };

class C { public: virtual class A* foo() const; };
class D : public virtual C { public: virtual struct B* foo() const; };

class B* D::foo() const { return 0; }

-
x.cpp:7: error: 'B* *.LTHUNK1() const' aliased to undefined symbol
'_ZTch0_v0_n24_NK1D3fooEv


-- 
   Summary: C++ gives bogus error message (aliased to undefined
symbol)
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sje at cup dot hp dot com


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



[Bug c/37168] New: ICE: in final_scan_insn, at final.c:2615 (altivec)

2008-08-19 Thread leligeour at ensiie dot fr
Problem when compiling altivec vectors with #define value.
Source will be attached.

Note: Patch is not triggered if you change the #define value

gcc -c is included in source file and recopied here :
Using built-in specs.
Target: powerpc64-unknown-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-4.3.1-r1/work/gcc-4.3.1/configure --prefix=/usr
--bindir=/usr/powerpc64-unknown-linux-gnu/gcc-bin/4.3.1--includedir=/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.1/include
--datadir=/usr/share/gcc-data/powerpc64-unknown-linux-gnu/4.3.1
--mandir=/usr/share/gcc-data/powerpc64-unknown-linux-gnu/4.3.1/man
--infodir=/usr/share/gcc-data/powerpc64-unknown-linux-gnu/4.3.1/info
--with-gxx-include-dir=/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.1/include/g++-v4
--host=powerpc64-unknown-linux-gnu --build=powerpc64-unknown-linux-gnu
--enable-altivec --enable-nls --without-included-gettext --with-system-zlib
--disable-checking --disable-werror --enable-secureplt --disable-multilib
--enable-libmudflap --disable-libssp --enable-cld --disable-libgcj
--enable-languages=c,c++,treelang,fortran --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.3.1-r1'
Thread model: posix
gcc version 4.3.1 (Gentoo 4.3.1-r1)


-- 
   Summary: ICE: in final_scan_insn, at final.c:2615 (altivec)
   Product: gcc
   Version: 4.3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: leligeour at ensiie dot fr
  GCC host triplet: powerpc64-unknown-linux-gnu
GCC target triplet: powerpc64-unknown-linux-gnu


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



[Bug c/37168] ICE: in final_scan_insn, at final.c:2615 (altivec)

2008-08-19 Thread leligeour at ensiie dot fr


--- Comment #1 from leligeour at ensiie dot fr  2008-08-19 22:59 ---
Created an attachment (id=16101)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16101action=view)
test.c


-- 


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



[Bug c/37168] ICE: in final_scan_insn, at final.c:2615 (altivec)

2008-08-19 Thread leligeour at ensiie dot fr


--- Comment #2 from leligeour at ensiie dot fr  2008-08-19 22:59 ---
Created an attachment (id=16102)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16102action=view)
test.i


-- 


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



[Bug target/37168] [4.3/4.4 Regression] ICE: in final_scan_insn, at final.c:2615 (altivec)

2008-08-19 Thread pinskia at gcc dot gnu dot org


--- Comment #3 from pinskia at gcc dot gnu dot org  2008-08-19 23:03 ---
Short testcase:
void _erfcf4(void)
{
  __attribute__((altivec(vector__))) float xsqu;
  __attribute__((altivec(vector__))) float tresult;
  { tresult = __builtin_vec_madd(tresult, xsqu,
(__attribute__((altivec(vector__))) float)
{3.68249351546114573519399405666776E-44f,
3.68249351546114573519399405666776E-44f,
3.68249351546114573519399405666776E-44f,
3.68249351546114573519399405666776E-44f}); };
}

Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   GCC host triplet|powerpc64-unknown-linux-gnu |
 GCC target triplet|powerpc64-unknown-linux-gnu |powerpc*-*-*
   Keywords||ice-on-valid-code
   Last reconfirmed|-00-00 00:00:00 |2008-08-19 23:03:11
   date||
Summary|ICE: in final_scan_insn, at |[4.3/4.4 Regression] ICE: in
   |final.c:2615 (altivec)  |final_scan_insn, at
   ||final.c:2615 (altivec)


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



[Bug target/37168] [4.3/4.4 Regression] ICE: in final_scan_insn, at final.c:2615 (altivec)

2008-08-19 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

  Known to fail||4.4.0
  Known to work||4.1.1
   Target Milestone|--- |4.3.2


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



[Bug target/37168] [4.3/4.4 Regression] ICE: in final_scan_insn, at final.c:2615 (altivec)

2008-08-19 Thread pinskia at gcc dot gnu dot org


--- Comment #4 from pinskia at gcc dot gnu dot org  2008-08-19 23:06 ---
Note the vector is representable by addition of two constant vectors integer
word 13 spatted.


-- 


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



[Bug target/37169] New: [4.4 Regression] Inefficent code for _mm_cvtsi64_si128

2008-08-19 Thread hjl dot tools at gmail dot com
[EMAIL PROTECTED] i386]$ cat x.c
/* { dg-do run } */
/* { dg-options -O2 -msse2 } */

#include emmintrin.h

__m128i
test (long long b)
{
  return _mm_cvtsi64_si128 (b); 
}
[EMAIL PROTECTED] i386]$
/export/build/gnu/gcc-avx-internal/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc-avx-internal/build-x86_64-linux/gcc/ -DDEBUG -Wall
-Werror  -mfpmath=sse x.c -S  -O2 -msse4 -march=core2
[EMAIL PROTECTED] i386]$ cat x.s
.file   x.c
.text
.p2align 4,,15
.globl test
.type   test, @function
test:
.LFB493:
.cfi_startproc
pxor%xmm0, %xmm0
pinsrq  $0, %rdi, %xmm0
ret
.cfi_endproc
.LFE493:
.size   test, .-test
[EMAIL PROTECTED] i386]$ 

Gcc 4.3 generates
[EMAIL PROTECTED] i386]$ gcc  x.c -S  -O2 -msse4 [EMAIL PROTECTED] i386]$ cat 
x.s
.file   x.c
.text
.p2align 4,,15
.globl test
.type   test, @function
test:
.LFB518:
movq%rdi, %xmm0
ret


-- 
   Summary: [4.4 Regression] Inefficent code for _mm_cvtsi64_si128
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl dot tools at gmail dot com
GCC target triplet: x86_64-unknown-linux-gnu


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



[Bug middle-end/37170] New: [4.4 Regression]: gcc.dg/weak/weak-1.c

2008-08-19 Thread hp at gcc dot gnu dot org
With 139231 this test passed.
With 139233 and on, I now see for cris-elf:

Running /tmp/hpautotest-gcc1/gcc/gcc/testsuite/gcc.dg/weak/weak.exp ...
FAIL: gcc.dg/weak/weak-1.c scan-assembler weak[^ \t]*[ \t]_?j

I see this regression in posted testresults from ia64 and powerpc64 too.

Apparently, this is caused by revision 139233 which appears to rely on
output_operand to catch all weaks, but the change to output_operand on July 21
to call assemble_external is incomplete and only works for targets where
variable references are always wrapped in exactly one MEM around a symbol_ref. 
(Missing cases of multiple mems, or where symbol_ref¨s aren't valid addresses
and offset references).

I'm testing a patch.


-- 
   Summary: [4.4 Regression]: gcc.dg/weak/weak-1.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: hp at gcc dot gnu dot org
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: cris-axis-elf


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



[Bug middle-end/37170] [4.4 Regression]: gcc.dg/weak/weak-1.c

2008-08-19 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 |
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2008-08-20 00:46:02
   date||


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



[Bug target/37169] [4.4 Regression] Inefficent code for _mm_cvtsi64_si128

2008-08-19 Thread hjl dot tools at gmail dot com


--- Comment #1 from hjl dot tools at gmail dot com  2008-08-20 01:39 ---
A patch is posted at

http://gcc.gnu.org/ml/gcc-patches/2008-08/msg01351.html


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

URL||http://gcc.gnu.org/ml/gcc-
   ||patches/2008-
   ||08/msg01351.html


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



[Bug testsuite/36889] [4.4 regression] gfortran.fortran-torture/execute/execute.exp tries to run sse2 execute tests without checking for host support

2008-08-19 Thread brian at dessent dot net


--- Comment #2 from brian at dessent dot net  2008-08-20 02:16 ---
(added testsuite maintainer on CC)

Well now you know one.  I understand that this may not affect most gcc
developers.  However it does affect casual volunteers who run the testsuite. 
By polluting the results with spurious fails it makes the results less useful,
and this sends the general message that volunteers running the testsuite on
old/spare hardware is not welcome.  I don't think that is a message you want to
be sending at all and indeed I seriously doubt that there was any such intent
with the changes.  Rather, I think there is simply an undetected bug that was
not caught exactly because most developers have newish machines.


-- 

brian at dessent dot net changed:

   What|Removed |Added

 CC||janis at gcc dot gnu dot org


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



[Bug regression/37171] New: [4.4 Regression] Canonical spelling optimization dependency

2008-08-19 Thread dje at gcc dot gnu dot org
The recent patch

* c-parser.c (c_lex_one_token): Do not store the canonical spelling
for keywords.

causes a significant performance regression on SPEC CPU2000 197.parser.  With
the above patch, the libc function __ctype_b_loc is called significantly more
times, spending twice the number of cycles in that function.  Profiling shows
94K hits for fast version and 190K hits for slow version.

We suspect that this may involve the toupper() calls in strncasecmp.c. 
Apparently the canonical name is necessary for some GCC optimization, possibly
the automatic substitution of builtins.


-- 
   Summary: [4.4 Regression] Canonical spelling optimization
dependency
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Keywords: missed-optimization
  Severity: normal
  Priority: P3
 Component: regression
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dje at gcc dot gnu dot org
 GCC build triplet: powerpc*-*-*
  GCC host triplet: powerpc*-*-*
GCC target triplet: powerpc*-*-*


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



[Bug regression/37171] [4.4 Regression] Canonical spelling optimization dependency

2008-08-19 Thread dje at gcc dot gnu dot org


--- Comment #1 from dje at gcc dot gnu dot org  2008-08-20 02:25 ---
confirmed


-- 

dje 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-08-20 02:25:37
   date||


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



[Bug c++/37172] New: g++ should not cast const iterator to non-const by default

2008-08-19 Thread nilmonid at gmail dot com
The following c++ source file compiled by gcc without any warnings/errors with
the flags -c -W -Wall -

//  start ---
#includestring
#includeset
using namespace std;

class A0
{
public:
typedef setint Groups;
typedef Groups::const_iterator ConstIterator;
typedef Groups::iteratorIterator;
public:
ConstIterator get() const { return values.begin(); }
Iterator  get()   { return values.begin(); }
private:
Groups values;
};

class A1
{
public:
A1(A0* b) : a(b) {}
void f1() { A0::ConstIterator itr = a-get(); }
void g1() { A0::Iterator  itr = a-get(); }  // error with vc++ 8.0
private:
const A0 *a;
};
//  end ---

However, the same code causes visual c++ 8.0 (visual studio 2005) to report
compilation error in the function g1() since it refuses to cast a const
iterator to non-const by default.

It seems that the behavior of gcc is incorrect and vc++ 8.0 is doing the right
thing since in the function g1(), the const pointer 'a' is only allowed to
invoke the const version of A0::get() which in turn would return a const
iterator. Unfortunately, gcc is automatically casting the returned const
iterator to a non-const iterator.


-- 
   Summary: g++ should not cast const iterator to non-const by
default
   Product: gcc
   Version: 4.3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: nilmonid at gmail dot com
 GCC build triplet: x86


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



[Bug fortran/37173] New: Check whether intrinsic assignment between character kind=1 / 4 is allowed

2008-08-19 Thread burnus at gcc dot gnu dot org
The Reply to the comments to the Fortran 2008 Candidate Draft,
http://www.j3-fortran.org/doc/year/08/08-272.html, contains:

 Unfortunately, the premise that intrinsic assignement between character 
 variables of different kind is allowed is wrong. See table 7.10 on page 152 
 of the draft: Type conformance for the intrinsic assignment. Character 
 assignments are only allowed for the same kind type parameter. J3 believes 
 the mapping between characters of different kind is difficult to define. 
 Consequently, J3 declines to make this addition.

If I understand the reply correctly, the following is invalid:

   character(kind=1) :: str = 4_'Hello'

We should check and reject it with -std=f* if it turns out to be invalid.


-- 
   Summary: Check whether intrinsic assignment between character
kind=1 / 4 is allowed
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Keywords: diagnostic
  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=37173