[Bug middle-end/51200] Wrong code sequence to store restrict volatile bitfield

2011-12-26 Thread jye2 at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51200

--- Comment #5 from jye2 at gcc dot gnu.org 2011-12-26 08:43:51 UTC ---
Author: jye2
Date: Mon Dec 26 08:43:48 2011
New Revision: 182685

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182685
Log:
2011-12-26  Joey Ye  

PR middle-end/51200
* gcc.dg/volatile-bitfields-2.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/volatile-bitfields-2.c
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug target/50705] Wrong assembly generated for bitwise AND for ppc 476

2011-12-26 Thread santoshkumar.a at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50705

SK  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #12 from SK  2011-12-26 14:08:05 
UTC ---
Invalid.


[Bug tree-optimization/51551] tree-loop-optimize chews all memory

2011-12-26 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51551

Mikael Pettersson  changed:

   What|Removed |Added

 CC||mikpe at it dot uu.se

--- Comment #3 from Mikael Pettersson  2011-12-26 
16:51:40 UTC ---
This test case was fixed on trunk by r171465:
http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01765.html
http://gcc.gnu.org/ml/gcc-cvs/2011-03/msg00889.html

However r171465 caused PR48290, so a backport also needs the two PR48290 fixes
(r171657 + r172494).  With all three backported to 4.6.2 the test case is fixed
there too with no test suite regressions for me on i686-linux.

But this may be a too large change for the upstream 4.6 branch.


[Bug tree-optimization/49790] [4.4 Regression] ICE in partition_view_bitmap, at tree-ssa-live.c:369

2011-12-26 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49790

Mikael Pettersson  changed:

   What|Removed |Added

 CC||mikpe at it dot uu.se

--- Comment #2 from Mikael Pettersson  2011-12-26 
17:08:09 UTC ---
This was fixed for 4.5 by r152203:
http://gcc.gnu.org/ml/gcc-patches/2009-09/msg01869.html
http://gcc.gnu.org/ml/gcc-cvs/2009-09/msg00954.html

Backporting that to 4.4.6 fixes the test case there too with no testsuite
regressions (at least for me on i686-linux).

It's my understanding that upstream gcc 4.4 branch will be EOL:d soon, so you
probably have to apply that fix locally if you're not able to upgrade to gcc
4.5 or newer.


[Bug tree-optimization/42802] FMAs not exploited

2011-12-26 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42802

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.6.0

--- Comment #2 from Andrew Pinski  2011-12-26 
19:47:12 UTC ---
vmovsd.LC0(%rip), %xmm2
vfmaddsd%xmm0, %xmm2, %xmm1, %xmm3
vfnmaddsd%xmm0, %xmm2, %xmm1, %xmm0
vmulsd%xmm0, %xmm3, %xmm0

Fixed by:
r166304 | rguenth | 2010-11-04 03:56:22 -0700 (Thu, 04 Nov 2010) | 38 lines

2010-11-04  Richard Guenther  
Richard Henderson  

* tree.def (FMA_EXPR): New tree code.
* expr.c (expand_expr_real_2): Add FMA_EXPR expansion code.
* gimple.c (gimple_rhs_class_table): FMA_EXPR is a GIMPLE_TERNARY_RHS.
* tree-cfg.c (verify_gimple_assign_ternary): Verify FMA_EXPR types.
* tree-inline.c (estimate_operator_cost): Handle FMA_EXPR.
* gimple-pretty-print.c (dump_ternary_rhs): Likewise.
* tree-ssa-math-opts.c (convert_mult_to_fma): New function.
(execute_optimize_widening_mul): Call it.  Reorganize to allow
dead stmt removal.  Move TODO flags ...
(pass_optimize_widening_mul): ... here.
* flag-types.h (enum fp_contract_mode): New enum.



[Bug rtl-optimization/51667] [4.7 Regression] new FAIL: 27_io/basic_*stream/* execution test with -m32

2011-12-26 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51667

--- Comment #15 from Eric Botcazou  2011-12-26 
21:54:37 UTC ---
Created attachment 26185
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26185
Tentative fix

To be more thoroughly tested.


[Bug other/51679] New: spurious parenthesis for -fassociative-math in manual and man page

2011-12-26 Thread vincent-gcc at vinc17 dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51679

 Bug #: 51679
   Summary: spurious parenthesis for -fassociative-math in manual
and man page
Classification: Unclassified
   Product: gcc
   Version: 4.6.2
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: other
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: vincent-...@vinc17.net


In the -fassociative-math description in the manual and man page:

  (x + 2**52) - 2**52)

The second closing parenthesis should be removed.


[Bug middle-end/51200] Wrong code sequence to store restrict volatile bitfield

2011-12-26 Thread jye2 at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51200

--- Comment #6 from jye2 at gcc dot gnu.org 2011-12-27 02:27:01 UTC ---
Author: jye2
Date: Tue Dec 27 02:26:57 2011
New Revision: 182691

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182691
Log:
2011-12-26  Joey Ye  
Revert original fix and backport r182545, 182649 from mainline

Revert:
2011-11-18  Joey Ye  

Port Bernd's fix to volatile bitfields
2010-12-02  Bernd Schmidt  

* expr.c (store_field): Avoid a direct store if the mode is larger
than the size of the bit field.
* stor-layout.c (layout_decl): If flag_strict_volatile_bitfields,
treat non-volatile bit fields like volatile ones.
* toplev.c (process_options): Disallow combination of
-fstrict-volatile-bitfields and ABI versions less than 2.
* config/arm/arm.c (arm_option_override): Don't enable
flag_strict_volatile_bitfields if the ABI version is less than 2.

Backport:
2011-12-20  Bernd Schmidt  

PR middle-end/51200
* expr.c (store_field): Avoid a direct store if the mode is larger
than the size of the bit field.
* stor-layout.c (layout_decl): If flag_strict_volatile_bitfields,
treat non-volatile bit fields like volatile ones.
* toplev.c (process_options): Disallow combination of
-fstrict-volatile-bitfields and ABI versions less than 2.
* config/arm/arm.c (arm_option_override): Don't enable
flag_strict_volatile_bitfields if the ABI version is less than 2.
* config/h8300/h8300.c (h8300_option_override): Likewise.
* config/rx/rx.c (rx_option_override): Likewise.
* config/m32c/m32c.c (m32c_option_override): Likewise.
* config/sh/sh.c (sh_option_override): Likewise.

2011-12-22  Joey Ye  

* toplev.c (process_options): Fix typo.

testsute
2011-12-26  Joey Ye  

Revert original fix and backport r182545, r182649 from mainline

Revert:
2011-11-23  Joey Ye  

Apply restrict volatile bitfield test case.
2011-11-23  Joey Ye  
* g++.dg/abi/bitfield12.C: Add option -fno-strict-volatile-bitfields.

Backport:
2011-12-20  Bernd Schmidt  

PR middle-end/51200
* gcc.target/arm/volatile-bitfields-4.c: New test.
* c-c++-common/abi-bf.c: New test.

2011-12-26  Joey Ye  

PR middle-end/51200
* gcc.dg/volatile-bitfields-2.c: New test.


Added:
branches/ARM/embedded-4_6-branch/gcc/testsuite/c-c++-common/abi-bf.c
   
branches/ARM/embedded-4_6-branch/gcc/testsuite/gcc.dg/volatile-bitfields-2.c
   
branches/ARM/embedded-4_6-branch/gcc/testsuite/gcc.target/arm/volatile-bitfields-4.c
Modified:
branches/ARM/embedded-4_6-branch/gcc/ChangeLog.arm
branches/ARM/embedded-4_6-branch/gcc/config/arm/arm.c
branches/ARM/embedded-4_6-branch/gcc/config/h8300/h8300.c
branches/ARM/embedded-4_6-branch/gcc/config/m32c/m32c.c
branches/ARM/embedded-4_6-branch/gcc/config/rx/rx.c
branches/ARM/embedded-4_6-branch/gcc/config/sh/sh.c
branches/ARM/embedded-4_6-branch/gcc/testsuite/ChangeLog.arm
branches/ARM/embedded-4_6-branch/gcc/testsuite/g++.dg/abi/bitfield12.C
branches/ARM/embedded-4_6-branch/gcc/toplev.c


[Bug c++/51680] New: g++ 4.7 fails to inline trivial template stuff

2011-12-26 Thread miles at gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51680

 Bug #: 51680
   Summary: g++ 4.7 fails to inline trivial template stuff
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: mi...@gnu.org


Given the following source code (and options "-O2 -S"):

   extern void process (float);

   template
   void process_fun_at (const Fun &fun, T x)
   {
 process (fun (x));
   }

   static float add1 (float x)
   {
 return x + 1;
   }

   void test (float i)
   {
 process_fun_at (add1, i);
   }

g++ 4.6 (and clang++ 3.0) produce the obvious output, inlining the template
function "process_fun_at", and the function "add1":

   .globl   test(float)
   test(float):
   addss.LC0(%rip), %xmm0
   jmp  process(float)
   .LC0:
   .long1065353216
   .ident   "GCC: (Debian 4.6.2-9) 4.6.2"


However g++ 4.7 produces much more awkward code, inlining nothing:

   add1(float):
   addss.LC0(%rip), %xmm0
   ret

   void process_fun_at(float ( const&)(float), float):
   subq $8, %rsp
   call *%rdi
   addq $8, %rsp
   jmp  process(float)

   .globl   test(float)
   test(float):
   movl add1(float), %edi
   jmp  void process_fun_at(float (
const&)(float), float)
   .LC0:
   .long1065353216
   .ident   "GCC: (Debian 20111210-1) 4.7.0 20111210 (experimental)
[trunk revision 182188]"


If I add the keyword "inline" to the declaration of the "process_fun_at"
template function, then g++ 4.7 inlines everything and produces the same result
as 4.6.

However my impression is that given such very simple input, it should do this
inlining automatically.

g++ version is:
(Debian 20111210-1) 4.7.0 20111210 (experimental) [trunk revision 182188]

Thanks,

-miles