[Bug fortran/58880] [4.9 Regression] [OOP] ICE on valid with FINAL function and type extension

2014-04-04 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58880

--- Comment #11 from Tobias Burnus burnus at gcc dot gnu.org ---
Draft patch:

--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -871,2 +871,5 @@ gfc_build_final_call (gfc_typespec ts, gfc_expr
*final_wrapper, gfc_expr *var,

+  if (final_wrapper-symtree-n.sym-module)
+final_wrapper-symtree-n.sym-attr.use_assoc = 1;
+
   gfc_start_block (block);


[Bug target/43751] dsymutil is not called for fortran and, under some circumstances not for other FEs.

2014-04-04 Thread dominiq at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43751

--- Comment #22 from dominiq at gcc dot gnu.org ---
Author: dominiq
Date: Fri Apr  4 06:43:56 2014
New Revision: 209070

URL: http://gcc.gnu.org/viewcvs?rev=209070root=gccview=rev
Log:
2014-03-26  Dominique d'Humieres  domi...@lps.ens.fr

PR target/43751
* lib/prune.exp: Modify the regular express to prune
the new warnings introduced by r205679 on darwin9.


Modified:
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
branches/gcc-4_8-branch/gcc/testsuite/gfortran.dg/fmt_en.f90


[Bug target/43751] dsymutil is not called for fortran and, under some circumstances not for other FEs.

2014-04-04 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43751

Dominique d'Humieres dominiq at lps dot ens.fr changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--- Comment #23 from Dominique d'Humieres dominiq at lps dot ens.fr ---
Wrong entry.


[Bug fortran/60128] [4.8 Regression] Wrong ouput using en edit descriptor

2014-04-04 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60128

Dominique d'Humieres dominiq at lps dot ens.fr changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--- Comment #65 from Dominique d'Humieres dominiq at lps dot ens.fr ---
Author: dominiq
Date: Fri Apr  4 06:43:56 2014
New Revision: 209070

2014-04-01  Dominique d'Humieres  domi...@lps.ens.fr

PR libfortran/60128
* gfortran.dg/fmt_en.f90: Skip unsupported rounding tests.
XFAIL for i?86-*-solaris2.9* and hppa*-*-hpux*.


Modified:
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
branches/gcc-4_8-branch/gcc/testsuite/gfortran.dg/fmt_en.f90


[Bug libstdc++/60758] New: Infinite backtrace in __cxa_end_cleanup

2014-04-04 Thread alexey.merzlyakov at samsung dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60758

Bug ID: 60758
   Summary: Infinite backtrace in  __cxa_end_cleanup
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: alexey.merzlyakov at samsung dot com
CC: v.garbuzov at samsung dot com, y.gribov at samsung dot com
Target: arm

Created attachment 32542
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=32542action=edit
Testcase to reproduce

While debugging a compiled testcase, the infinite backtrace appears:
  Breakpoint 1, __gnu_end_cleanup () at
../../../../gcc-src/libstdc++-v3/libsupc++/eh_arm.cc:134
  134../../../../gcc-src/libstdc++-v3/libsupc++/eh_arm.cc: No such file or
directory.
  (gdb) bt
  #0  __gnu_end_cleanup () at
../../../../gcc-src/libstdc++-v3/libsupc++/eh_arm.cc:134
  #1  0xb6f45b2c in __cxa_end_cleanup () from /lib/libstdc++.so.6
  #2  0xb6f45b2c in __cxa_end_cleanup () from /lib/libstdc++.so.6
  #3  0xb6f45b2c in __cxa_end_cleanup () from /lib/libstdc++.so.6
  #4  0xb6f45b2c in __cxa_end_cleanup () from /lib/libstdc++.so.6
  ...

GCC configuration:
  $ arm-linux-gnueabi-gcc -v
  Using built-in specs.
  COLLECT_GCC=./arm-linux-gnueabi-gcc
 
COLLECT_LTO_WRAPPER=/home/alexey.merzlyakov/arm/libexec/gcc/arm-linux-gnueabi/4.9.0/lto-wrapper
  Target: arm-linux-gnueabi
  Configured with: ../gcc-src/configure --host=i686-pc-linux-gnu
--target=arm-linux-gnueabi --prefix=/home/alexey.merzlyakov/arm
--with-sysroot=/home/alexey.merzlyakov/arm/arm-linux-gnueabi/sys-root
--disable-libmudflap --disable-libssp --with-mode=arm --with-fpu=vfpv3
--with-cpu=cortex-a15 --with-tune=cortex-a15 --with-float=softfp
--disable-libatomic --disable-libgomp --enable-languages=c,c++
--with-gmp=/home/alexey.merzlyakov/arm --with-mpfr=/home/alexey.merzlyakov/arm
--with-mpc=/home/alexey.merzlyakov/arm
  Thread model: posix
  gcc version 4.9.0 20140403 (experimental) (GCC)

Compiling the testcase:
  $ arm-linux-gnueabi-g++ rethrow_if_nested.ii -std=gnu++0x -g

The __cxa_end_cleanup() does not save/restore LR in function header/footer and
does not provide any unwind info:
libstdc++-v3/libsupc++/eh_arm.cc -
  __cxa_end_cleanup:\n
 push\t{r1, r2, r3, r4}\n
 bl\t__gnu_end_cleanup\n
 pop\t{r1, r2, r3, r4}\n
 bl\t_Unwind_Resume @ Never returns\n
GDB uses LR saving/restoring information when making a backtrace (when unwind
info is not available). Otherwise if there are no information, the LR on
current frame will be equal to LR on previous frame. It causes GDB to generate
same backtrace-items for __cxa_end_cleanup again and again.

I would expect the same problem for other tools that unwind stacks (e.g. unwind
code in libgcc, libbacktrace, etc.).

So, it seems to be a libstdc++ bug. Adding the LR in the arguments of
save/restore instructions in __cxa_end_cleanup() code fixes it. Another option
would be to add unwind entries (.cfi_whatever).


[Bug libstdc++/60758] Infinite backtrace in __cxa_end_cleanup

2014-04-04 Thread alexey.merzlyakov at samsung dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60758

--- Comment #1 from Alexey Merzlyakov alexey.merzlyakov at samsung dot com ---
Created attachment 32543
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=32543action=edit
Proposed patch

Proposed patch is attached.


[Bug bootstrap/60719] With --program-prefix=$target_alias --program-suffix=-$version install-driver breaks

2014-04-04 Thread tschwinge at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60719

--- Comment #4 from Thomas Schwinge tschwinge at gcc dot gnu.org ---
Author: tschwinge
Date: Fri Apr  4 08:09:23 2014
New Revision: 209072

URL: http://gcc.gnu.org/viewcvs?rev=209072root=gccview=rev
Log:
Fix shell scripting.

PR bootstrap/60719
* Makefile.in (install-driver): Fix shell scripting.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/Makefile.in


[Bug rtl-optimization/60757] combine uses exponential time in nonzero_bits1 recursion

2014-04-04 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60757

--- Comment #2 from Richard Biener rguenth at gcc dot gnu.org ---
Can you point to the recursion please?


[Bug middle-end/60746] [4.9 Regression] ICE segfault in gimple-expr.c:314

2014-04-04 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60746

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P1
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2014-04-04
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Richard Biener rguenth at gcc dot gnu.org ---
create_tmp_var should be create_tmp_reg and it needs cfun ...

let me poke at it.


[Bug c++/60747] the tree-vrp compilation flag produce wrong assembly

2014-04-04 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60747

Eric Botcazou ebotcazou at gcc dot gnu.org changed:

   What|Removed |Added

 CC||ebotcazou at gcc dot gnu.org

--- Comment #8 from Eric Botcazou ebotcazou at gcc dot gnu.org ---
 What we don't agree on is the code should behave the same regardless to the
 optimization level.

That's not doable, this would mean disabling optimizations at -O2 because there
are not enabled at -O0.  You need to write valid C++ instead.


[Bug c++/60750] [4.8/4.9 Regression] double free after std::move on string inside throw when compiled with optimization

2014-04-04 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60750

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||wrong-code
   Priority|P3  |P2
   Target Milestone|--- |4.8.3

--- Comment #4 from Richard Biener rguenth at gcc dot gnu.org ---
valgrind says

==12050== Invalid free() / delete / delete[] / realloc()
==12050==at 0x4C28FAC: operator delete(void*) (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12050==by 0x400DA3: main (basic_string.h:547)
==12050==  Address 0x5a0b0b0 is 0 bytes inside a block of size 30 free'd
==12050==at 0x4C28FAC: operator delete(void*) (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12050==by 0x4EF6879: std::string::_M_mutate(unsigned long, unsigned long,
unsigned long) (in /usr/lib64/libstdc++.so.6.0.20)
==12050==by 0x4EF6D1D: std::string::_M_replace_safe(unsigned long, unsigned
long, char const*, unsigned long) (in /usr/lib64/libstdc++.so.6.0.20)
==12050==by 0x400CF3: thrower(std::string) (basic_string.h:1277)
==12050==by 0x400D8F: main (t.C:13)


[Bug fortran/60718] Test case gfortran.dg/select_type_4.f90 fails on ARM

2014-04-04 Thread bernd.edlinger at hotmail dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60718

--- Comment #4 from Bernd Edlinger bernd.edlinger at hotmail dot de ---
in this example, we have

__class_poly_list_Node_type_p is alias_set 3
which is used for the list_type::head, next fields

and

__class_poly_list_Node_type is alias set 8
which is used for the parameter new_node of append_node

but the invocation at MAIN__ supplies a __class_poly_list_Node_type_p node.

I am not sure, but I think these should be either the
same type or at least have the same alias set.


[Bug fortran/60718] Test case gfortran.dg/select_type_4.f90 fails on ARM

2014-04-04 Thread bernd.edlinger at hotmail dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60718

--- Comment #5 from Bernd Edlinger bernd.edlinger at hotmail dot de ---
both types are essentially identical,
64 bits large, consist of two pointers, data, and vptr.
data points to the target structure, and vptr is the class type.


[Bug debug/60756] var-tracking selects wrong registers

2014-04-04 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60756

Eric Botcazou ebotcazou at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-04-04
 Ever confirmed|0   |1

--- Comment #1 from Eric Botcazou ebotcazou at gcc dot gnu.org ---
 The parameter str is passed in x0+x1, and immediately copied into
 the call-saved registers x22+x23, where they stay for the duration
 of the function.
 
 But var-tracking works (or appears to work) back-to-front, taking
 the location of the variable from the src rather than the dest of
 a copy.

Yes, that's the original design (-fno-var-tracking-assignments nowadays) and
the correct approach if you are interested in the location of a fixed quantity.
 Then -fvar-tracking-assignments reversed the viewpoint to track variable
quantities.

 At minimum it would seem that taking DECL_RTL into account when
 examining these assignments would be a good start.  When copying into
 its canonical location, it would seem a great time to alter the
 live range.

Does this work better with -fno-var-tracking-assignments?


[Bug c++/60750] [4.8/4.9 Regression] double free after std::move on string inside throw when compiled with optimization

2014-04-04 Thread trippels at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60750

--- Comment #5 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
-fno-ipa-pure-const fixes the issue.


[Bug c++/60750] [4.8/4.9 Regression] double free after std::move on string inside throw when compiled with optimization

2014-04-04 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60750

--- Comment #6 from Richard Biener rguenth at gcc dot gnu.org ---
(In reply to Markus Trippelsdorf from comment #5)
 -fno-ipa-pure-const fixes the issue.

local pure const computes thrower() as noreturn.  Adding noreturn to it in
the source reproduces the problem even with -fno-ipa-pure-const (but not
with -O0 or GCC 4.7).

Thus, adjusted testcase:

#include string
#include stdexcept
#include stdio.h

const std::string err_prefix = Problem: ;
void __attribute__((noreturn)) thrower (std::string msg) {
throw std::runtime_error(err_prefix + std::move(msg));
}

int main(int argc, char **argv) {
try {
std::string base = hello;
thrower(std::move(base));
} catch (const std::runtime_error e) {
printf( Leaving catch. %s\n, e.what());
}

printf( exiting nbd\n);
return 0;
}


[Bug c++/60750] [4.8/4.9 Regression] double free after std::move on string inside throw when compiled with optimization

2014-04-04 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60750

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org

--- Comment #7 from Richard Biener rguenth at gcc dot gnu.org ---
For some reason thrower() is pure(!?) (no vdef) and thus FRE maybe does some
invalid transform.  Oh.

  /* A 'pure' or a 'const' function never call-clobbers anything.
 A 'noreturn' function might, but since we don't return anyway
 there is no point in recording that.  */
  if (!(call_flags  (ECF_PURE | ECF_CONST | ECF_NORETURN)))
add_virtual_operand (fn, stmt, opf_def);

that's of course true, but only if the function doesn't return otherwise
(like via EH):

  # VUSE .MEM_11
  thrower (D.20915);
;;succ:   5 (EH)

it doesn't save us much when we remove that optimization (we save a
VDEF), but I can imagine other analyses being confused about this because
generally no VDEF - doesn't store.


[Bug rtl-optimization/59429] Missed optimization opportunity in qsort-style comparison functions

2014-04-04 Thread ktietz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59429

Kai Tietz ktietz at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-04-04
 CC||ktietz at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #4 from Kai Tietz ktietz at gcc dot gnu.org ---
This issue seems to be another problem caused by missing unification of
expressions.

For given example we get for 'comGE' the following gimple:

comGE (int a, int b)
{
  int iftmp.8_1;
  int _2;
  _Bool _6;
  int _7;

  bb 2:
  if (a_3(D) = b_4(D))
goto bb 3;
  else
goto bb 4;

  bb 3:
  _6 = a_3(D) != b_4(D);
  _2 = (int) _6;
  _7 = -_2;

  bb 4:
  # iftmp.8_1 = PHI _7(3), 1(2)
  return iftmp.8_1;

}

As we see we don't optimize out the negate case.
For expression:
  (a_3(D)  b_4(D) ? 1 : -((int) (a_3(D) != b_4(D
we should transform it instead to:
  (a_3(D)  b_4(D) ? -1 : (int) (a_3(D) != b_4(D)))

The reference to gold's --icf option looks for me wrong here.  Such
optimizations - as done here for gold - can't be done by gcc.  At least not for
the given example provided.  In other TUs there always might users of direct
function-address in comparison.  So to find and reduce identical code-blocks is
just a linker feature (with some danger IMHO).

So back to this issue.  I would think it is more a problem to be solved on
gimple, and not that much a RTL issue in first hand.


[Bug fortran/60718] Test case gfortran.dg/select_type_4.f90 fails on ARM

2014-04-04 Thread bernd.edlinger at hotmail dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60718

--- Comment #6 from Bernd Edlinger bernd.edlinger at hotmail dot de ---
hmm,

gfc_build_class_symbol creates different types,
if a class has the allocatable, target or pointer attribute.

  get_unique_hashed_string (tname, ts-u.derived);
  if ((*as)  attr-allocatable)
sprintf (name, __class_%s_%d_%da, tname, rank, (*as)-corank);
  else if ((*as)  attr-pointer)
sprintf (name, __class_%s_%d_%dp, tname, rank, (*as)-corank);
  else if ((*as))
sprintf (name, __class_%s_%d_%d, tname, rank, (*as)-corank);
  else if (attr-pointer)
sprintf (name, __class_%s_p, tname);
  else if (attr-allocatable)
sprintf (name, __class_%s_a, tname);
  else
sprintf (name, __class_%s, tname);


But the class(xxx), pointer is passed to class(xxx), target when
used as a procedure parameter. this makes one type alias another.

maybe the test case is wrong, passing one flavor of object to
another?

  subroutine append_node (list, new_node)   

!-- Append a node to a list.   
!-- Caller is responsible for allocating the node. 

!-- interface. 

type(list_type), intent(inout) :: list 
-   class(node_type), target :: new_node  
+   class(node_type), pointer, intent(in) :: new_node  

!-- executable code.


[Bug middle-end/60746] [4.9 Regression] ICE segfault in gimple-expr.c:314

2014-04-04 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60746

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Richard Biener rguenth at gcc dot gnu.org ---
Fixed.

--- Comment #4 from Richard Biener rguenth at gcc dot gnu.org ---
Author: rguenth
Date: Fri Apr  4 11:52:35 2014
New Revision: 209079

URL: http://gcc.gnu.org/viewcvs?rev=209079root=gccview=rev
Log:
2014-04-04  Richard Biener  rguent...@suse.de

PR ipa/60746
* tree-ssanames.c (make_ssa_name_fn): Fix assert.
* gimple.c (gimple_set_bb): Avoid ICEing for NULL cfun for
non-GIMPLE_LABELs.
* gimplify.h (gimple_add_tmp_var_fn): Declare.
* gimplify.c (gimple_add_tmp_var_fn): New function.
* gimple-expr.h (create_tmp_reg_fn): Declare.
* gimple-expr.c (create_tmp_reg_fn): New function.
* gimple-low.c (record_vars_into): Don't change cfun.
* cgraph.c (cgraph_redirect_edge_call_stmt_to_callee): Fix
code generation without cfun.

* g++.dg/torture/pr60746.C: New testcase.

Added:
trunk/gcc/testsuite/g++.dg/torture/pr60746.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cgraph.c
trunk/gcc/gimple-expr.c
trunk/gcc/gimple-expr.h
trunk/gcc/gimple-low.c
trunk/gcc/gimple.c
trunk/gcc/gimplify.c
trunk/gcc/gimplify.h
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssanames.c


[Bug middle-end/60746] [4.9 Regression] ICE segfault in gimple-expr.c:314

2014-04-04 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60746

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Richard Biener rguenth at gcc dot gnu.org ---
Fixed.

--- Comment #4 from Richard Biener rguenth at gcc dot gnu.org ---
Author: rguenth
Date: Fri Apr  4 11:52:35 2014
New Revision: 209079

URL: http://gcc.gnu.org/viewcvs?rev=209079root=gccview=rev
Log:
2014-04-04  Richard Biener  rguent...@suse.de

PR ipa/60746
* tree-ssanames.c (make_ssa_name_fn): Fix assert.
* gimple.c (gimple_set_bb): Avoid ICEing for NULL cfun for
non-GIMPLE_LABELs.
* gimplify.h (gimple_add_tmp_var_fn): Declare.
* gimplify.c (gimple_add_tmp_var_fn): New function.
* gimple-expr.h (create_tmp_reg_fn): Declare.
* gimple-expr.c (create_tmp_reg_fn): New function.
* gimple-low.c (record_vars_into): Don't change cfun.
* cgraph.c (cgraph_redirect_edge_call_stmt_to_callee): Fix
code generation without cfun.

* g++.dg/torture/pr60746.C: New testcase.

Added:
trunk/gcc/testsuite/g++.dg/torture/pr60746.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cgraph.c
trunk/gcc/gimple-expr.c
trunk/gcc/gimple-expr.h
trunk/gcc/gimple-low.c
trunk/gcc/gimple.c
trunk/gcc/gimplify.c
trunk/gcc/gimplify.h
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssanames.c


[Bug c++/60750] [4.8/4.9 Regression] double free after std::move on string inside throw when compiled with optimization

2014-04-04 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60750

--- Comment #8 from Richard Biener rguenth at gcc dot gnu.org ---
Patch posted and in testing - the underlying issue is present at least since
4.1 (didn't check 4.0 sources).


[Bug tree-optimization/55177] missed optimizations with __builtin_bswap

2014-04-04 Thread krebbel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55177

Andreas Krebbel krebbel at gcc dot gnu.org changed:

   What|Removed |Added

 CC||krebbel at gcc dot gnu.org

--- Comment #13 from Andreas Krebbel krebbel at gcc dot gnu.org ---
Is that one fixed with?
2013-05-24  Eric Botcazou  ebotca...@adacore.com

PR rtl-optimization/55177
* simplify-rtx.c (simplify_unary_operation_1) NOT: Deal with BSWAP.
(simplify_byte_swapping_operation): New.
(simplify_binary_operation_1): Call it for AND, IOR and XOR.
(simplify_relational_operation_1): Deal with BSWAP.


[Bug target/60657] [4.9 Regression] ICE: error: insn does not satisfy its constraints

2014-04-04 Thread law at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60657

--- Comment #9 from Jeffrey A. Law law at gcc dot gnu.org ---
Author: law
Date: Fri Apr  4 13:13:20 2014
New Revision: 209085

URL: http://gcc.gnu.org/viewcvs?rev=209085root=gccview=rev
Log:
PR target/60657
* config/arm/predicates.md (const_int_I_operand): New predicate.
(const_int_M_operand): Similarly.
* config/arm/arm.md (insv_zero): Use const_int_M_operand instead of
const_int_operand.
(insv_t2, extv_reg, extzv_t2): Likewise.
(load_multiple_with_writeback): Similarly for const_int_I_operand.
(pop_multiple_with_writeback_and_return): Likewise.
(vfp_pop_multiple_with_writeback): Likewise

PR target/60657
* gcc.target/arm/pr60657.c: New test.

Added:
trunk/gcc/testsuite/gcc.target/arm/pr60657.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/arm/arm.md
trunk/gcc/config/arm/predicates.md
trunk/gcc/testsuite/ChangeLog


[Bug target/60657] [4.9 Regression] ICE: error: insn does not satisfy its constraints

2014-04-04 Thread law at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60657

Jeffrey A. Law law at redhat dot com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #10 from Jeffrey A. Law law at redhat dot com ---
Fixed on trunk.


[Bug rtl-optimization/60650] [ARM] LRA ICE in assign_by_spills

2014-04-04 Thread law at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60650

Jeffrey A. Law law at redhat dot com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||law at redhat dot com
 Resolution|--- |FIXED

--- Comment #13 from Jeffrey A. Law law at redhat dot com ---
Fixed on trunk by Vlad's patch.


[Bug fortran/60191] test case gfortran.dg/dynamic_dispatch_1/3.f03 fail on ARMv7

2014-04-04 Thread edlinger at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60191

--- Comment #14 from edlinger at gcc dot gnu.org ---
Author: edlinger
Date: Fri Apr  4 13:54:16 2014
New Revision: 209091

URL: http://gcc.gnu.org/viewcvs?rev=209091root=gccview=rev
Log:
2014-04-04  Bernd Edlinger  bernd.edlin...@hotmail.de

PR fortran/60191
* fortran/trans-types.c (gfc_get_function_type): In case of recursion
build a variadic function type with empty argument list instead of a
stdarg-like function type with incomplete argument list.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/fortran/trans-types.c


[Bug rtl-optimization/60757] combine uses exponential time in nonzero_bits1 recursion

2014-04-04 Thread amylaar at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60757

--- Comment #3 from Jorn Wolfgang Rennecke amylaar at gcc dot gnu.org ---
Created attachment 32544
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=32544action=edit
typescript with backtrace

It appears that some other epiphany patches I had in my tree I thought were
unrelated are, in fact, also relevant.

The exact version I've been using can be retrieved with:

git clone g...@github.com:adapteva/epiphany-gcc.git
cd epiphany-gcc
git checkout ee67b804bd922ddcc72695973bed4641ba29801c


[Bug target/57949] [powerpc64] Structure parameter alignment issue with vector extensions

2014-04-04 Thread wschmidt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57949

--- Comment #10 from Bill Schmidt wschmidt at gcc dot gnu.org ---
Author: wschmidt
Date: Fri Apr  4 14:05:08 2014
New Revision: 209095

URL: http://gcc.gnu.org/viewcvs?rev=209095root=gccview=rev
Log:
[gcc]

2014-04-04  Bill Schmidt  wschm...@linux.vnet.ibm.com

Backport from mainline r201750.
Note: Default setting of -mcompat-align-parm inverted!

2013-08-14  Bill Schmidt  wschm...@linux.vnet.ibm.com

PR target/57949
* doc/invoke.texi: Add documentation of mcompat-align-parm
option.
* config/rs6000/rs6000.opt: Add mcompat-align-parm option.
* config/rs6000/rs6000.c (rs6000_function_arg_boundary): For AIX
and Linux, correct BLKmode alignment when 128-bit alignment is
required and compatibility flag is not set.
(rs6000_gimplify_va_arg): For AIX and Linux, honor specified
alignment for zero-size arguments when compatibility flag is not
set.

[gcc/testsuite]

2014-04-04  Bill Schmidt  wschm...@linux.vnet.ibm.com

Backport from mainline r201750.
Note: Default setting of -mcompat-align-parm inverted!

2013-08-14  Bill Schmidt  wschm...@linux.vnet.ibm.com

PR target/57949
* gcc.target/powerpc/pr57949-1.c: New.
* gcc.target/powerpc/pr57949-2.c: New.




Added:
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/powerpc/pr57949-1.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/powerpc/pr57949-2.c
Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/config/rs6000/rs6000.c
branches/gcc-4_8-branch/gcc/config/rs6000/rs6000.opt
branches/gcc-4_8-branch/gcc/doc/invoke.texi
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog


[Bug rtl-optimization/60757] combine uses exponential time in nonzero_bits1 recursion

2014-04-04 Thread amylaar at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60757

--- Comment #4 from Jorn Wolfgang Rennecke amylaar at gcc dot gnu.org ---
(In reply to Jorn Wolfgang Rennecke from comment #3)
 Created attachment 32544 [details]
 typescript with backtrace
 
 It appears that some other epiphany patches I had in my tree I thought were
 unrelated are, in fact, also relevant.
 
 The exact version I've been using can be retrieved with:
 
 git clone g...@github.com:adapteva/epiphany-gcc.git
 cd epiphany-gcc
 git checkout ee67b804bd922ddcc72695973bed4641ba29801c

P.S.: that version sits on branch epiphany-gcc-4.8, so it should be sufficient
to clone that branch.  And it's based on the gcc git mirror, so if you have
a git local repo with gcc git mirror contents, most of the objects should
already be there.


[Bug ipa/60640] [4.9 Regression] ICE edge points to wrong declaration / verify_cgraph_node failed

2014-04-04 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60640

--- Comment #12 from Martin Jambor jamborm at gcc dot gnu.org ---
Author: jamborm
Date: Fri Apr  4 14:11:06 2014
New Revision: 209097

URL: http://gcc.gnu.org/viewcvs?rev=209097root=gccview=rev
Log:
2014-04-04  Martin Jambor  mjam...@suse.cz

PR ipa/60640
* cgraph.h (cgraph_clone_node): New parameter added to declaration.
Adjust all callers.
* cgraph.c (clone_of_p): Also return true if thunks match.
(verify_edge_corresponds_to_fndecl): Removed extraneous call to
cgraph_function_or_thunk_node and an obsolete comment.
* cgraphclones.c (build_function_type_skip_args): Moved upwards in the
file.
(build_function_decl_skip_args): Likewise.
(set_new_clone_decl_and_node_flags): New function.
(duplicate_thunk_for_node): Likewise.
(redirect_edge_duplicating_thunks): Likewise.
(cgraph_clone_node): New parameter args_to_skip, pass it to
redirect_edge_duplicating_thunks which is called instead of
cgraph_redirect_edge_callee.
(cgraph_create_virtual_clone): Pass args_to_skip to cgraph_clone_node,
moved setting of a lot of flags to set_new_clone_decl_and_node_flags.

testsuite/
* g++.dg/ipa/pr60640-1.C: New test.
* g++.dg/ipa/pr60640-2.C: Likewise.
* g++.dg/ipa/pr60640-3.C: Likewise.
* g++.dg/ipa/pr60640-4.C: Likewise.


Added:
trunk/gcc/testsuite/g++.dg/ipa/pr60640-1.C
trunk/gcc/testsuite/g++.dg/ipa/pr60640-2.C
trunk/gcc/testsuite/g++.dg/ipa/pr60640-3.C
trunk/gcc/testsuite/g++.dg/ipa/pr60640-4.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cgraph.c
trunk/gcc/cgraph.h
trunk/gcc/cgraphclones.c
trunk/gcc/ipa-inline-transform.c
trunk/gcc/ipa-inline.c
trunk/gcc/lto-cgraph.c
trunk/gcc/testsuite/ChangeLog


[Bug c/60759] New: -Wlogical-op should perhaps warn about two-way implicit conversions

2014-04-04 Thread giuliano.procida at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60759

Bug ID: 60759
   Summary: -Wlogical-op should perhaps warn about two-way
implicit conversions
   Product: gcc
   Version: 4.6.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: giuliano.procida at googlemail dot com

Expressions of the form a  b or a || b that involve both implicit
bool-integer and implicit integer-bool coercion, represent a probable misuse
of a logical operator.

These should perhaps generate warnings, particularly for C++ code:

int foo(int x);

int a = foo(1) || foo(2);  // Confusion with Perl, Python behaviour,
int one = 2  3;  // or perhaps bitwise operation was intended.

These should not probably generate warnings:

while (foo(1) || foo(2));
int zero = (1 != 2)  (3 == 4);

Example:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.6 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object
--enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686
--with-tune=generic --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) 

$ cat foo.c
static int x = 2 || 3;
int main() { return x; }

$ gcc -Wall -Wextra -Wlogical-op foo.c
$ g++ -Wall -Wextra -Wlogical-op foo.c
[no warnings]


[Bug target/56843] PowerPC Newton-Raphson reciprocal estimates can be improved

2014-04-04 Thread wschmidt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56843

--- Comment #6 from Bill Schmidt wschmidt at gcc dot gnu.org ---
Author: wschmidt
Date: Fri Apr  4 14:29:23 2014
New Revision: 209104

URL: http://gcc.gnu.org/viewcvs?rev=209104root=gccview=rev
Log:
[gcc]

2014-04-04  Bill Schmidt  wschm...@linux.vnet.ibm.com

Backport from mainline
2013-04-05  Bill Schmidt  wschm...@linux.vnet.ibm.com

PR target/56843
* config/rs6000/rs6000.c (rs6000_emit_swdiv_high_precision): Remove.
(rs6000_emit_swdiv_low_precision): Remove.
(rs6000_emit_swdiv): Rewrite to handle between one and four
iterations of Newton-Raphson generally; modify required number of
iterations for some cases.
* config/rs6000/rs6000.h (RS6000_RECIP_HIGH_PRECISION_P): Remove.

[gcc/testsuite]

2014-04-04  Bill Schmidt  wschm...@linux.vnet.ibm.com

Backport from mainline
2013-04-05  Bill Schmidt  wschm...@linux.vnet.ibm.com

PR target/56843
* gcc.target/powerpc/recip-1.c: Modify expected output.
* gcc.target/powerpc/recip-3.c: Likewise.
* gcc.target/powerpc/recip-4.c: Likewise.
* gcc.target/powerpc/recip-5.c: Add expected output for iterations.


Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/config/rs6000/rs6000.c
branches/gcc-4_8-branch/gcc/config/rs6000/rs6000.h
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/powerpc/recip-1.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/powerpc/recip-3.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/powerpc/recip-4.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/powerpc/recip-5.c


[Bug libgomp/60670] omp.h may differ between multilibs

2014-04-04 Thread ro at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670

Rainer Orth ro at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |4.9.0


[Bug target/59844] Powerpc64le cannot bootstrap with -O3/-mcpu=power8

2014-04-04 Thread wschmidt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59844

--- Comment #6 from Bill Schmidt wschmidt at gcc dot gnu.org ---
Author: wschmidt
Date: Fri Apr  4 14:32:32 2014
New Revision: 209105

URL: http://gcc.gnu.org/viewcvs?rev=209105root=gccview=rev
Log:
[gcc]

2014-04-04  Bill Schmidt  wschm...@linux.vnet.ibm.com

Back port from mainline
2014-01-16  Michael Meissner  meiss...@linux.vnet.ibm.com

PR target/59844
* config/rs6000/rs6000.md (reload_vsx_from_gprsf): Add little
endian support, remove tests for WORDS_BIG_ENDIAN.
(p8_mfvsrd_3_mode): Likewise.
(reload_gpr_from_vsxmode): Likewise.
(reload_gpr_from_vsxsf): Likewise.
(p8_mfvsrd_4_disf): Likewise.

[gcc/testsuite]

2014-04-04  Bill Schmidt  wschm...@linux.vnet.ibm.com

Backport from mainline
2013-10-23  Pat Haugen  pthau...@us.ibm.com

* gcc.target/powerpc/direct-move.h: Fix header for executable tests.


Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/config/rs6000/rs6000.md
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/powerpc/direct-move.h


[Bug target/59909] Quad memory bootstrap issues on little endian powerpc64 power8 systems

2014-04-04 Thread wschmidt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59909

--- Comment #9 from Bill Schmidt wschmidt at gcc dot gnu.org ---
Author: wschmidt
Date: Fri Apr  4 14:42:18 2014
New Revision: 209107

URL: http://gcc.gnu.org/viewcvs?rev=209107root=gccview=rev
Log:
[gcc/testsuite]

2014-04-04  Bill Schmidt  wschm...@linux.vnet.ibm.com

Back port from mainline
2014-01-23  Michael Meissner  meiss...@linux.vnet.ibm.com

PR target/59909
* gcc.target/powerpc/quad-atomic.c: New file to test power8 quad
word atomic functions at runtime.

[gcc]

2014-04-04  Bill Schmidt  wschm...@linux.vnet.ibm.com

Back port from mainline
2014-01-23  Michael Meissner  meiss...@linux.vnet.ibm.com

PR target/59909
* doc/invoke.texi (RS/6000 and PowerPC Options): Document
-mquad-memory-atomic.  Update -mquad-memory documentation to say
it is only used for non-atomic loads/stores.

* config/rs6000/predicates.md (quad_int_reg_operand): Allow either
-mquad-memory or -mquad-memory-atomic switches.

* config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Add
-mquad-memory-atomic to ISA 2.07 support.

* config/rs6000/rs6000.opt (-mquad-memory-atomic): Add new switch
to separate support of normal quad word memory operations (ldq,
stq) from the atomic quad word memory operations.

* config/rs6000/rs6000.c (rs6000_option_override_internal): Add
support to separate non-atomic quad word operations from atomic
quad word operations.  Disable non-atomic quad word operations in
little endian mode so that we don't have to swap words after the
load and before the store.
(quad_load_store_p): Add comment about atomic quad word support.
(rs6000_opt_masks): Add -mquad-memory-atomic to the list of
options printed with -mdebug=reg.

* config/rs6000/rs6000.h (TARGET_SYNC_TI): Use
-mquad-memory-atomic as the test for whether we have quad word
atomic instructions.
(TARGET_SYNC_HI_QI): If either -mquad-memory-atomic,
-mquad-memory, or -mp8-vector are used, allow byte/half-word
atomic operations.

* config/rs6000/sync.md (load_lockedti): Insure that the address
is a proper indexed or indirect address for the lqarx instruction.
On little endian systems, swap the hi/lo registers after the lqarx
instruction.
(load_lockedpti): Use indexed_or_indirect_operand predicate to
insure the address is valid for the lqarx instruction.
(store_conditionalti): Insure that the address is a proper indexed
or indirect address for the stqcrx. instruction.  On little endian
systems, swap the hi/lo registers before doing the stqcrx.
instruction.
(store_conditionalpti): Use indexed_or_indirect_operand predicate to
insure the address is valid for the stqcrx. instruction.

* gcc/config/rs6000/rs6000-c.c (rs6000_target_modify_macros):
Define __QUAD_MEMORY__ and __QUAD_MEMORY_ATOMIC__ based on what
type of quad memory support is available.


Added:
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/powerpc/quad-atomic.c
Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/config/rs6000/predicates.md
branches/gcc-4_8-branch/gcc/config/rs6000/rs6000-c.c
branches/gcc-4_8-branch/gcc/config/rs6000/rs6000-cpus.def
branches/gcc-4_8-branch/gcc/config/rs6000/rs6000.c
branches/gcc-4_8-branch/gcc/config/rs6000/rs6000.h
branches/gcc-4_8-branch/gcc/config/rs6000/rs6000.opt
branches/gcc-4_8-branch/gcc/config/rs6000/sync.md
branches/gcc-4_8-branch/gcc/doc/invoke.texi
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog


[Bug c/60759] -Wlogical-op should perhaps warn about two-way implicit conversions

2014-04-04 Thread mpolacek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60759

Marek Polacek mpolacek at gcc dot gnu.org changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek mpolacek at gcc dot gnu.org ---
We could perhaps implement clang's -Wconstant-logical-operand, but I must say I
don't like it very much.


[Bug c++/60760] New: arithmetic on null pointers should not be allowed in constant expressions

2014-04-04 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60760

Bug ID: 60760
   Summary: arithmetic on null pointers should not be allowed in
constant expressions
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Keywords: accepts-invalid
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: redi at gcc dot gnu.org

G++ should not compile this:

constexpr int* ptr = nullptr;
constexpr int* ptr2 = ptr + 1;


[Bug c/60759] -Wlogical-op should perhaps warn about two-way implicit conversions

2014-04-04 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60759

Manuel López-Ibáñez manu at gcc dot gnu.org changed:

   What|Removed |Added

 CC||manu at gcc dot gnu.org

--- Comment #2 from Manuel López-Ibáñez manu at gcc dot gnu.org ---
(In reply to Marek Polacek from comment #1)
 We could perhaps implement clang's -Wconstant-logical-operand, but I must
 say I don't like it very much.

So work on something that you like, there so much to do in GCC, that you can be
choosy ;-) In particular, Wlogical-op is not enabled by Wextra because of some
known bugs. If those were fixed it would be extremely more useful than adding
more stuff to it.

What does Wconstant-logical-operand do?

[Bug target/60137] Code fails with -mcpu=power8 -O3 -mno-vsx

2014-04-04 Thread wschmidt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60137

--- Comment #4 from Bill Schmidt wschmidt at gcc dot gnu.org ---
Author: wschmidt
Date: Fri Apr  4 15:02:38 2014
New Revision: 209111

URL: http://gcc.gnu.org/viewcvs?rev=209111root=gccview=rev
Log:
[gcc]

2014-04-04  Bill Schmidt  wschm...@linux.vnet.ibm.com

Backport from mainline r207699.
2014-02-11  Michael Meissner  meiss...@linux.vnet.ibm.com

PR target/60137
* config/rs6000/rs6000.md (128-bit GPR splitter): Add a splitter
for VSX/Altivec vectors that land in GPR registers.

Backport from mainline r207808.
2014-02-15  Michael Meissner  meiss...@linux.vnet.ibm.com

PR target/60203
* config/rs6000/rs6000.md (rreg): Add TFmode, TDmode constraints.
(movmode_internal, TFmode/TDmode): Split TFmode/TDmode moves
into 64-bit and 32-bit moves.  On 64-bit moves, add support for
using direct move instructions on ISA 2.07.  Also adjust
instruction length for 64-bit.
(movmode_64bit, TFmode/TDmode): Likewise.
(movmode_32bit, TFmode/TDmode): Likewise.

Backport from mainline r207868.
2014-02-18  Michael Meissner  meiss...@linux.vnet.ibm.com

PR target/60203
* config/rs6000/rs6000.md (movmode_64bit, TF/TDmode moves):
Split 64-bit moves into 2 patterns.  Do not allow the use of
direct move for TDmode in little endian, since the decimal value
has little endian bytes within a word, but the 64-bit pieces are
ordered in a big endian fashion, and normal subreg's of TDmode are
not allowed.
(movmode_64bit_dm): Likewise.
(movtd_64bit_nodm): Likewise.

[gcc/testsuite]

2014-04-04  Bill Schmidt  wschm...@linux.vnet.ibm.com

Backport from mainline r207699.
2014-02-11  Michael Meissner  meiss...@linux.vnet.ibm.com

PR target/60137
* gcc.target/powerpc/pr60137.c: New file.

Backport from mainline r207808.
2014-02-15  Michael Meissner  meiss...@linux.vnet.ibm.com

PR target/60203
* gcc.target/powerpc/pr60203.c: New testsuite.


Added:
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/powerpc/pr60137.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/powerpc/pr60203.c
Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/config/rs6000/rs6000.md
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog


[Bug target/60203] Support long double/_Decimal128 direct move on power8

2014-04-04 Thread wschmidt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60203

--- Comment #8 from Bill Schmidt wschmidt at gcc dot gnu.org ---
Author: wschmidt
Date: Fri Apr  4 15:02:38 2014
New Revision: 209111

URL: http://gcc.gnu.org/viewcvs?rev=209111root=gccview=rev
Log:
[gcc]

2014-04-04  Bill Schmidt  wschm...@linux.vnet.ibm.com

Backport from mainline r207699.
2014-02-11  Michael Meissner  meiss...@linux.vnet.ibm.com

PR target/60137
* config/rs6000/rs6000.md (128-bit GPR splitter): Add a splitter
for VSX/Altivec vectors that land in GPR registers.

Backport from mainline r207808.
2014-02-15  Michael Meissner  meiss...@linux.vnet.ibm.com

PR target/60203
* config/rs6000/rs6000.md (rreg): Add TFmode, TDmode constraints.
(movmode_internal, TFmode/TDmode): Split TFmode/TDmode moves
into 64-bit and 32-bit moves.  On 64-bit moves, add support for
using direct move instructions on ISA 2.07.  Also adjust
instruction length for 64-bit.
(movmode_64bit, TFmode/TDmode): Likewise.
(movmode_32bit, TFmode/TDmode): Likewise.

Backport from mainline r207868.
2014-02-18  Michael Meissner  meiss...@linux.vnet.ibm.com

PR target/60203
* config/rs6000/rs6000.md (movmode_64bit, TF/TDmode moves):
Split 64-bit moves into 2 patterns.  Do not allow the use of
direct move for TDmode in little endian, since the decimal value
has little endian bytes within a word, but the 64-bit pieces are
ordered in a big endian fashion, and normal subreg's of TDmode are
not allowed.
(movmode_64bit_dm): Likewise.
(movtd_64bit_nodm): Likewise.

[gcc/testsuite]

2014-04-04  Bill Schmidt  wschm...@linux.vnet.ibm.com

Backport from mainline r207699.
2014-02-11  Michael Meissner  meiss...@linux.vnet.ibm.com

PR target/60137
* gcc.target/powerpc/pr60137.c: New file.

Backport from mainline r207808.
2014-02-15  Michael Meissner  meiss...@linux.vnet.ibm.com

PR target/60203
* gcc.target/powerpc/pr60203.c: New testsuite.


Added:
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/powerpc/pr60137.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/powerpc/pr60203.c
Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/config/rs6000/rs6000.md
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog


[Bug target/58675] ICE in rs6000_secondary_reload_inner:15460, type = store

2014-04-04 Thread wschmidt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58675

--- Comment #9 from Bill Schmidt wschmidt at gcc dot gnu.org ---
Author: wschmidt
Date: Fri Apr  4 15:05:34 2014
New Revision: 209112

URL: http://gcc.gnu.org/viewcvs?rev=209112root=gccview=rev
Log:
2014-04-04  Bill Schmidt  wschm...@linux.vnet.ibm.com

Apply mainline r207798
2014-02-26  Alan Modra  amo...@gmail.com
PR target/58675
PR target/57935
* config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Use
find_replacement on parts of insn rtl that might be reloaded.

Backport from mainline r208287
2014-03-03  Bill Schmidt  wschm...@linux.vnet.ibm.com

* config/rs6000/rs6000.c (rs6000_preferred_reload_class): Disallow
reload of PLUS rtx's outside of GENERAL_REGS or BASE_REGS; relax
constraint on constants to permit them being loaded into
GENERAL_REGS or BASE_REGS.


Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/config/rs6000/rs6000.c


[Bug target/57935] ICE in rs6000_secondary_reload_inner:15181, type = load

2014-04-04 Thread wschmidt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57935

--- Comment #5 from Bill Schmidt wschmidt at gcc dot gnu.org ---
Author: wschmidt
Date: Fri Apr  4 15:05:34 2014
New Revision: 209112

URL: http://gcc.gnu.org/viewcvs?rev=209112root=gccview=rev
Log:
2014-04-04  Bill Schmidt  wschm...@linux.vnet.ibm.com

Apply mainline r207798
2014-02-26  Alan Modra  amo...@gmail.com
PR target/58675
PR target/57935
* config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Use
find_replacement on parts of insn rtl that might be reloaded.

Backport from mainline r208287
2014-03-03  Bill Schmidt  wschm...@linux.vnet.ibm.com

* config/rs6000/rs6000.c (rs6000_preferred_reload_class): Disallow
reload of PLUS rtx's outside of GENERAL_REGS or BASE_REGS; relax
constraint on constants to permit them being loaded into
GENERAL_REGS or BASE_REGS.


Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/config/rs6000/rs6000.c


[Bug target/57052] missed optimization with rotate and mask

2014-04-04 Thread wschmidt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57052

--- Comment #3 from Bill Schmidt wschmidt at gcc dot gnu.org ---
Author: wschmidt
Date: Fri Apr  4 15:10:24 2014
New Revision: 209114

URL: http://gcc.gnu.org/viewcvs?rev=209114root=gccview=rev
Log:
2014-04-04  Bill Schmidt  wschm...@linux.vnet.ibm.com

Back port from trunk
2013-04-25  Alan Modra  amo...@gmail.com

PR target/57052
* config/rs6000/rs6000.md (rotlsi3_internal7): Rename to
rotlsi3_internal7le and condition on !BYTES_BIG_ENDIAN.
(rotlsi3_internal8be): New BYTES_BIG_ENDIAN insn.
Repeat for many other rotate/shift and mask patterns using subregs.
Name lshiftrt insns.
(ashrdisi3_noppc64): Rename to ashrdisi3_noppc64be and condition
on WORDS_BIG_ENDIAN.

2013-06-07  Alan Modra  amo...@gmail.com

* config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
override user -mfp-in-toc.
(offsettable_ok_by_alignment): Consider just the current access
rather than the whole object, unless BLKmode.  Handle
CONSTANT_POOL_ADDRESS_P constants that lack a decl too.
(use_toc_relative_ref): Allow CONSTANT_POOL_ADDRESS_P constants
for -mcmodel=medium.
* config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Don't
override user -mfp-in-toc or -msum-in-toc.  Default to
-mno-fp-in-toc for -mcmodel=medium.

2013-06-18  Alan Modra  amo...@gmail.com

* config/rs6000/rs6000.h (enum data_align): New.
(LOCAL_ALIGNMENT, DATA_ALIGNMENT): Use rs6000_data_alignment.
(DATA_ABI_ALIGNMENT): Define.
(CONSTANT_ALIGNMENT): Correct comment.
* config/rs6000/rs6000-protos.h (rs6000_data_alignment): Declare.
* config/rs6000/rs6000.c (rs6000_data_alignment): New function.

2013-07-11  Ulrich Weigand  ulrich.weig...@de.ibm.com

* config/rs6000/rs6000.md (*tls_gd_lowTLSmode:tls_abi_suffix):
Require GOT register as additional operand in UNSPEC.
(*tls_ld_lowTLSmode:tls_abi_suffix): Likewise.
(*tls_got_dtprel_lowTLSmode:tls_abi_suffix): Likewise.
(*tls_got_tprel_lowTLSmode:tls_abi_suffix): Likewise.
(*tls_gdTLSmode:tls_abi_suffix): Update splitter.
(*tls_ldTLSmode:tls_abi_suffix): Likewise.
(tls_got_dtprel_TLSmode:tls_abi_suffix): Likewise.
(tls_got_tprel_TLSmode:tls_abi_suffix): Likewise.

2014-01-23  Pat Haugen  pthau...@us.ibm.com

* config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
force flag_ira_loop_pressure if set via command line.

2014-02-06  Alan Modra  amo...@gmail.com

PR target/60032
* config/rs6000/rs6000.c (rs6000_secondary_memory_needed_mode): Only
change SDmode to DDmode when lra_in_progress.


Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/config/rs6000/linux64.h
branches/gcc-4_8-branch/gcc/config/rs6000/rs6000-protos.h
branches/gcc-4_8-branch/gcc/config/rs6000/rs6000.c
branches/gcc-4_8-branch/gcc/config/rs6000/rs6000.h
branches/gcc-4_8-branch/gcc/config/rs6000/rs6000.md


[Bug target/60032] [4.9 regression] ICE in reload_cse_simplify_operands, at postreload.c:411

2014-04-04 Thread wschmidt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60032

--- Comment #10 from Bill Schmidt wschmidt at gcc dot gnu.org ---
Author: wschmidt
Date: Fri Apr  4 15:10:24 2014
New Revision: 209114

URL: http://gcc.gnu.org/viewcvs?rev=209114root=gccview=rev
Log:
2014-04-04  Bill Schmidt  wschm...@linux.vnet.ibm.com

Back port from trunk
2013-04-25  Alan Modra  amo...@gmail.com

PR target/57052
* config/rs6000/rs6000.md (rotlsi3_internal7): Rename to
rotlsi3_internal7le and condition on !BYTES_BIG_ENDIAN.
(rotlsi3_internal8be): New BYTES_BIG_ENDIAN insn.
Repeat for many other rotate/shift and mask patterns using subregs.
Name lshiftrt insns.
(ashrdisi3_noppc64): Rename to ashrdisi3_noppc64be and condition
on WORDS_BIG_ENDIAN.

2013-06-07  Alan Modra  amo...@gmail.com

* config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
override user -mfp-in-toc.
(offsettable_ok_by_alignment): Consider just the current access
rather than the whole object, unless BLKmode.  Handle
CONSTANT_POOL_ADDRESS_P constants that lack a decl too.
(use_toc_relative_ref): Allow CONSTANT_POOL_ADDRESS_P constants
for -mcmodel=medium.
* config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Don't
override user -mfp-in-toc or -msum-in-toc.  Default to
-mno-fp-in-toc for -mcmodel=medium.

2013-06-18  Alan Modra  amo...@gmail.com

* config/rs6000/rs6000.h (enum data_align): New.
(LOCAL_ALIGNMENT, DATA_ALIGNMENT): Use rs6000_data_alignment.
(DATA_ABI_ALIGNMENT): Define.
(CONSTANT_ALIGNMENT): Correct comment.
* config/rs6000/rs6000-protos.h (rs6000_data_alignment): Declare.
* config/rs6000/rs6000.c (rs6000_data_alignment): New function.

2013-07-11  Ulrich Weigand  ulrich.weig...@de.ibm.com

* config/rs6000/rs6000.md (*tls_gd_lowTLSmode:tls_abi_suffix):
Require GOT register as additional operand in UNSPEC.
(*tls_ld_lowTLSmode:tls_abi_suffix): Likewise.
(*tls_got_dtprel_lowTLSmode:tls_abi_suffix): Likewise.
(*tls_got_tprel_lowTLSmode:tls_abi_suffix): Likewise.
(*tls_gdTLSmode:tls_abi_suffix): Update splitter.
(*tls_ldTLSmode:tls_abi_suffix): Likewise.
(tls_got_dtprel_TLSmode:tls_abi_suffix): Likewise.
(tls_got_tprel_TLSmode:tls_abi_suffix): Likewise.

2014-01-23  Pat Haugen  pthau...@us.ibm.com

* config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
force flag_ira_loop_pressure if set via command line.

2014-02-06  Alan Modra  amo...@gmail.com

PR target/60032
* config/rs6000/rs6000.c (rs6000_secondary_memory_needed_mode): Only
change SDmode to DDmode when lra_in_progress.


Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/config/rs6000/linux64.h
branches/gcc-4_8-branch/gcc/config/rs6000/rs6000-protos.h
branches/gcc-4_8-branch/gcc/config/rs6000/rs6000.c
branches/gcc-4_8-branch/gcc/config/rs6000/rs6000.h
branches/gcc-4_8-branch/gcc/config/rs6000/rs6000.md


[Bug target/60735] GCC targeting E500 with SPE has errors with the _Decimal64 type

2014-04-04 Thread wschmidt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60735

--- Comment #5 from Bill Schmidt wschmidt at gcc dot gnu.org ---
Author: wschmidt
Date: Fri Apr  4 15:14:01 2014
New Revision: 209116

URL: http://gcc.gnu.org/viewcvs?rev=209116root=gccview=rev
Log:
[gcc]

2014-04-04  Bill Schmidt  wschm...@linux.vnet.ibm.com

Back port mainline subversion id 209025.
2014-04-02  Michael Meissner  meiss...@linux.vnet.ibm.com

PR target/60735
* config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): If we have
software floating point or no floating point registers, do not
allow any type in the FPRs.  Eliminate a test for SPE SIMD types
in GPRs that occurs after we tested for GPRs that would never be
true.

* config/rs6000/rs6000.md (movmode_softfloat32, FMOVE64):
Rewrite tests to use TARGET_DOUBLE_FLOAT and TARGET_E500_DOUBLE,
since the FMOVE64 type is DFmode/DDmode.  If TARGET_E500_DOUBLE,
specifically allow DDmode, since that does not use the SPE SIMD
instructions.


Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/config/rs6000/rs6000.c
branches/gcc-4_8-branch/gcc/config/rs6000/rs6000.md


[Bug libgomp/60670] omp.h may differ between multilibs

2014-04-04 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670

Tobias Burnus burnus at gcc dot gnu.org changed:

   What|Removed |Added

 CC||burnus at gcc dot gnu.org

--- Comment #3 from Tobias Burnus burnus at gcc dot gnu.org ---
(In reply to r...@cebitec.uni-bielefeld.de from comment #2)
  --- Comment #1 from Richard Biener rguenth at gcc dot gnu.org ---
  Or the header needs to include all variants with proper #ifdef-ery
 
 This is difficult for a header generated per multilib at build time.

A similar issue potentially arises for OpenMP's Fortran libraries under
finclude/, i.e. omp_lib.h, omp_lib.f90, omp_lib.mod, omp_lib_kinds.mod.

Recall that the module files (.mod) are not preprocessed - and the .h files are
not if one uses include 'omp_lib' (instead of #include)

However, I think for currently used type there should be no problem (with
all/most targets).


[Bug libgomp/60670] omp.h may differ between multilibs

2014-04-04 Thread ro at CeBiTec dot Uni-Bielefeld.DE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670

--- Comment #4 from ro at CeBiTec dot Uni-Bielefeld.DE ro at CeBiTec dot 
Uni-Bielefeld.DE ---
 --- Comment #3 from Tobias Burnus burnus at gcc dot gnu.org ---
 (In reply to r...@cebitec.uni-bielefeld.de from comment #2)
  --- Comment #1 from Richard Biener rguenth at gcc dot gnu.org ---
  Or the header needs to include all variants with proper #ifdef-ery
 
 This is difficult for a header generated per multilib at build time.

 A similar issue potentially arises for OpenMP's Fortran libraries under
 finclude/, i.e. omp_lib.h, omp_lib.f90, omp_lib.mod, omp_lib_kinds.mod.

 Recall that the module files (.mod) are not preprocessed - and the .h files 
 are
 not if one uses include 'omp_lib' (instead of #include)

 However, I think for currently used type there should be no problem (with
 all/most targets).

Right, at least on Solaris/SPARC and x86 the 32-bit and 64-bit
omp_lib.{h,mod} are identical.

Rainer


[Bug ipa/60761] New: Names of all function clones in g++ are built-in, in both warnings and dumps

2014-04-04 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60761

Bug ID: 60761
   Summary: Names of all function clones in g++ are built-in,
in both warnings and dumps
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ipa
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jamborm at gcc dot gnu.org
CC: jakub at gcc dot gnu.org

Since revision r207465, all names of function clones in g++ (as
opposed to the C front-end) are built-in, in dumps and even in
warnings, for example:

mjambor@virgil:~/gcc/bisect/test/clonenames$ ~/gcc/bisect/inst/bin/g++ -O3 -S
-Wall zz.C -fno-inline
zz.C: In function ‘built-in’:
zz.C:14:13: warning: iteration 3u invokes undefined behavior
[-Waggressive-loop-optimizations] 
 z[i] = i;
 ^
zz.C:13:3: note: containing loop
   for (int i = 0; i  s; i++)
   ^
zz.C:14:8: warning: array subscript is above array bounds [-Warray-bounds]
 z[i] = i;
^
mjambor@virgil:~/gcc/bisect/test/clonenames$ cat zz.C
extern int sum;

void do_sum (char *p)
{
  for (int i = 0; i  2; i++)
sum += p[i];
}

void
foo (int s)
{
  char z[3];
  for (int i = 0; i  s; i++)
z[i] = i;
  do_sum (z);
}

int
bar (int i)
{
  foo (4);
  return 0;
}

[Bug ipa/60761] Names of all function clones in g++ are built-in, in both warnings and dumps

2014-04-04 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60761

--- Comment #1 from Martin Jambor jamborm at gcc dot gnu.org ---
This is because in dump_decl in gcc/cp/error.c there is:

case FUNCTION_DECL:
  if (! DECL_LANG_SPECIFIC (t))
pp_string (pp, M_(built-in));

and the revision causing this clears DECL_LANG_SPECIFIC.


[Bug rtl-optimization/60155] ICE: in get_pressure_class_and_nregs at gcse.c:3438

2014-04-04 Thread law at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60155

--- Comment #12 from Jeffrey A. Law law at redhat dot com ---
Dave, 

The updated patch looks good.  Please post it to gcc-patches for archival
purposes with a note that I approved it in BZ before installing the patch.

Thanks,
jeff


[Bug ipa/60640] [4.9 Regression] ICE edge points to wrong declaration / verify_cgraph_node failed

2014-04-04 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60640

Martin Jambor jamborm at gcc dot gnu.org changed:

   What|Removed |Added

URL||http://gcc.gnu.org/ml/gcc-p
   ||atches/2014-04/msg00208.htm
   ||l

--- Comment #13 from Martin Jambor jamborm at gcc dot gnu.org ---
Fixed on trunk with
http://gcc.gnu.org/ml/gcc-patches/2014-04/msg00208.html

I have posted the patch for the 4.8 branch:
http://gcc.gnu.org/ml/gcc-patches/2014-04/msg00213.html

and also for the 4.7 branch:
http://gcc.gnu.org/ml/gcc-patches/2014-04/msg00215.html


[Bug debug/60756] var-tracking selects wrong registers

2014-04-04 Thread rth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60756

--- Comment #2 from Richard Henderson rth at gcc dot gnu.org ---
Yes, this testcase works better with -fno-var-tracking-assignments.

It seems to be a mixed bag, though.  Running the testsuite with this
argument causes 79 previously failing guality tests to pass, but
causes 200 more new failures.

I wonder if there's some way to get the best of both worlds?


[Bug bootstrap/60743] build/genautomata uses 700 MB memory for ARM

2014-04-04 Thread ktkachov at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60743

--- Comment #7 from ktkachov at gcc dot gnu.org ---
Author: ktkachov
Date: Fri Apr  4 15:47:45 2014
New Revision: 209119

URL: http://gcc.gnu.org/viewcvs?rev=209119root=gccview=rev
Log:
[ARM/AArch64] Reduce divider reservation duration in Cortex-A53 pipeline
decription

PR bootstrap/60743
* config/arm/cortex-a53.md (cortex_a53_fdivs): Reduce reservation
duration.
(cortex_a53_fdivd): Likewise.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/arm/cortex-a53.md


[Bug bootstrap/60743] build/genautomata uses 700 MB memory for ARM

2014-04-04 Thread ktkachov at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60743

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from ktkachov at gcc dot gnu.org ---
Should be fixed on trunk now.


[Bug libstdc++/60758] Infinite backtrace in __cxa_end_cleanup

2014-04-04 Thread ramana at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60758

Ramana Radhakrishnan ramana at gcc dot gnu.org changed:

   What|Removed |Added

 CC||ramana at gcc dot gnu.org

--- Comment #2 from Ramana Radhakrishnan ramana at gcc dot gnu.org ---
Please send patches to the mailing list after testing them appropriately and
not attach them to bugzilla.


[Bug debug/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand

2014-04-04 Thread ramana at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60655

--- Comment #9 from Ramana Radhakrishnan ramana at gcc dot gnu.org ---
Author: ramana
Date: Fri Apr  4 16:10:07 2014
New Revision: 209121

URL: http://gcc.gnu.org/viewcvs?rev=209121root=gccview=rev
Log:
Fix PR debug/60655 - part 1



This is a partial fix for PR60655 where dwarf2out.c rejects NOT of a
value in const_ok_for_output_1. There is still a problem with the
testcase on armhf where we get operations of the form, const (minus
(const_int) (symref)) without the -fdata-sections option which is just
weird. I'm not yet sure where this is produced from and will not have
the time to dig further today.


As Jakub said on IRC, const_ok_for_output_1 is called only with
partial rtx's and therefore disabling minus (const_int) (symref) might
not be the best thing to do especially if this were part of plus
(symref) (minus (const int) (symref)) and both symrefs were in the
same section.


Bootstrapped and regtested on armhf

Bootstrap and regression test running on x86_64.

Ok to commit ?

regards
Ramana

gcc/

DATE   Jakub Jelinek ja...@redhat.com
 Ramana Radhakrishnan  ramana.radhakrish...@arm.com

* dwarf2out.c (const_ok_for_output_1): Reject expressions
containing a NOT.

gcc/testsuite

DATE  Ramana Radhakrishnan  ramana.radhakrish...@arm.com

* gcc.c-torture/compile/pr60655-1.c: New test.

Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr60655-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/dwarf2out.c
trunk/gcc/testsuite/ChangeLog


[Bug debug/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand

2014-04-04 Thread ramana at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60655

--- Comment #10 from Ramana Radhakrishnan ramana at gcc dot gnu.org ---
Partially fixed on trunk - need to handle the failure without -fdata-sections
and -g


[Bug rtl-optimization/60763] New: ICE in extract_insn starting with rev 208984

2014-04-04 Thread pthaugen at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60763

Bug ID: 60763
   Summary: ICE in extract_insn starting with rev 208984
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: pthaugen at gcc dot gnu.org
CC: bergner at gcc dot gnu.org, dje at gcc dot gnu.org,
rsandifo at gcc dot gnu.org
  Host: powerpc64-linux
Target: powerpc64-linux
 Build: powerpc64-linux

Bootstrap build on PowerPC using --with-cpu=power8 started failing in stage2
build with stated revision. Also noticed with non-bootstrap build that several
testcases fail in similar manner. Following is example (reduced from
gcc.c-torture/compile/20020604-1.c).

[pthaugen@igoo delta]$ cat 20020604-1.c
foo (unsigned int n, int x, int y, unsigned char *z)
{
  {
unsigned int i;
for (i = 0; i  n; i++)
  {
{
  union
  {
float r;
unsigned int i;
  }
  e;
  ((e.i = 0x3f7f) ? ((int) e.i 
  0) ? (unsigned char) 0 : (unsigned char) 255
   : (e.r = e.r * (255.0F / 256.0F) + 32768.0F, (unsigned char) e.i));
}
  }
  }
}
[pthaugen@igoo delta]$ ~/install/gcc/trunk_work/bin/gcc -c -O1 -mcpu=power8
20020604-1.c
20020604-1.c: In function ‘foo’:
20020604-1.c:20:1: error: unrecognizable insn:
 }
 ^
(insn 64 63 65 5 (set (subreg:DI (reg:SF 32 0) 0)
(reg:DI 8 8)) 20020604-1.c:16 -1
 (nil))
20020604-1.c:20:1: internal compiler error: in extract_insn, at recog.c:2202
0x105fafe3 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/home/pthaugen/src/gcc/trunk_work/gcc/gcc/rtl-error.c:109
0x105fb053 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
/home/pthaugen/src/gcc/trunk_work/gcc/gcc/rtl-error.c:117
0x105c5723 extract_insn(rtx_def*)
/home/pthaugen/src/gcc/trunk_work/gcc/gcc/recog.c:2202
0x105c57ef extract_insn_cached(rtx_def*)
/home/pthaugen/src/gcc/trunk_work/gcc/gcc/recog.c:2105
0x10370f37 cleanup_subreg_operands(rtx_def*)
/home/pthaugen/src/gcc/trunk_work/gcc/gcc/final.c:3063
0x105c46b7 split_insn
/home/pthaugen/src/gcc/trunk_work/gcc/gcc/recog.c:2920
0x105c498b split_all_insns()
/home/pthaugen/src/gcc/trunk_work/gcc/gcc/recog.c:2974
0x105c4b0f rest_of_handle_split_after_reload
/home/pthaugen/src/gcc/trunk_work/gcc/gcc/recog.c:3923
0x105c4b0f execute
/home/pthaugen/src/gcc/trunk_work/gcc/gcc/recog.c:3952
Please submit a full bug report,

[Bug bootstrap/60743] build/genautomata uses 700 MB memory for ARM

2014-04-04 Thread bernd.edlinger at hotmail dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60743

--- Comment #9 from Bernd Edlinger bernd.edlinger at hotmail dot de ---
The patch works for me.

Thanks for fixing this so quickly!


[Bug libstdc++/50871] [C++0x] G++ fails to reject explicitly-defaulted function definition with different exception spec in system headers

2014-04-04 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50871

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2014-04-04
   Assignee|unassigned at gcc dot gnu.org  |redi at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #11 from Jonathan Wakely redi at gcc dot gnu.org ---
This bug hides the fact that we've apparently always been missing exception
specs on the operator== and operator!= for std::allocator.

Clang noticed this:

/home/jwakely/src/gcc/gcc/libstdc++-v3/testsuite/20_util/headers/memory/synopsis.cc:27:8:
error: exception specification in declaration does not match previous
declaration
/home/jwakely/src/gcc/gcc/libstdc++-v3/testsuite/20_util/headers/memory/synopsis.cc:29:8:
error: exception specification in declaration does not match previous
declaration
2 errors generated.

I'll look into using -pedantic when building the library and maybe for some of
the testsuite.


[Bug debug/60756] var-tracking selects wrong registers

2014-04-04 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60756

--- Comment #3 from Eric Botcazou ebotcazou at gcc dot gnu.org ---
 Yes, this testcase works better with -fno-var-tracking-assignments.

That's expected for the param-[123].c testcases.

 It seems to be a mixed bag, though.  Running the testsuite with this
 argument causes 79 previously failing guality tests to pass, but
 causes 200 more new failures.

Yes, both modes have severe limitations.

 I wonder if there's some way to get the best of both worlds?

That's what I have been trying to do recently for these testcases: selectively
shut down -fvar-tracking-assignments to track the location instead of the
value, because it's for aggregate parameters and they are rarely modified.

I'll investigate why this isn't sufficient on aarch64.


[Bug c++/60760] arithmetic on null pointers should not be allowed in constant expressions

2014-04-04 Thread daniel.kruegler at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60760

Daniel Krügler daniel.kruegler at googlemail dot com changed:

   What|Removed |Added

 CC||daniel.kruegler@googlemail.
   ||com

--- Comment #1 from Daniel Krügler daniel.kruegler at googlemail dot com ---
Agreed. But it should still be possible to add the additive identity (The core
language drafted to support this):

constexpr int* ptr = nullptr;
constexpr int x = 0;
constexpr int* ptr2 = ptr + x;

[Bug c++/60760] arithmetic on null pointers should not be allowed in constant expressions

2014-04-04 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60760

--- Comment #2 from Jonathan Wakely redi at gcc dot gnu.org ---
Yes, we rely on that in initializer_list::end(), and clang rejects that.

I discussed that case with Jason and we think [expr.add] could be clarified -
do you have an existing issue number related to that?


[Bug c++/58207] [4.7/4.8/4.9 Regression] ICE in sort_constexpr_mem_initializers due to out of bounds vector access

2014-04-04 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58207

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |paolo.carlini at oracle 
dot com

--- Comment #5 from Paolo Carlini paolo.carlini at oracle dot com ---
Mine.


[Bug lto/59626] [4.8/4.9 Regression] /usr/include/bits/unistd.h:173:1: error: inlining failed in call to always_inline 'readlinkat': recursive inlining

2014-04-04 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59626

--- Comment #21 from Jan Hubicka hubicka at gcc dot gnu.org ---
Author: hubicka
Date: Fri Apr  4 18:02:31 2014
New Revision: 209123

URL: http://gcc.gnu.org/viewcvs?rev=209123root=gccview=rev
Log:

PR ipa/59626
* lto-cgraph.c (input_overwrite_node): Check that partitioning
flags are set only during streaming.
* ipa.c (process_references, walk_polymorphic_call_targets,
symtab_remove_unreachable_nodes): Drop bodies of always inline
after early inlining.
(symtab_remove_unreachable_nodes): Remove always_inline attribute.
* gcc.dg/lto/pr59626_0.c: New testcase.
* gcc.dg/lto/pr59626_1.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/lto/pr59626_0.c
trunk/gcc/testsuite/gcc.dg/lto/pr59626_1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa.c
trunk/gcc/lto-cgraph.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/60760] arithmetic on null pointers should not be allowed in constant expressions

2014-04-04 Thread daniel.kruegler at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60760

--- Comment #3 from Daniel Krügler daniel.kruegler at googlemail dot com ---
(In reply to Jonathan Wakely from comment #2)
 Yes, we rely on that in initializer_list::end(), and clang rejects that.

nod

 I discussed that case with Jason and we think [expr.add] could be clarified
 - do you have an existing issue number related to that?

I haven't - I myself found the existing wording always clear in that regard.

[Bug fortran/60718] Test case gfortran.dg/select_type_4.f90 fails on ARM

2014-04-04 Thread mikael at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60718

Mikael Morin mikael at gcc dot gnu.org changed:

   What|Removed |Added

 CC||mikael at gcc dot gnu.org

--- Comment #7 from Mikael Morin mikael at gcc dot gnu.org ---
(In reply to Bernd Edlinger from comment #6)
 hmm,
 
 gfc_build_class_symbol creates different types,
 if a class has the allocatable, target or pointer attribute.
 
[...]
 
 But the class(xxx), pointer is passed to class(xxx), target when
 used as a procedure parameter. this makes one type alias another.
 
 maybe the test case is wrong, passing one flavor of object to
 another?
 
This is not a problem; a pointer has the target attribute.
In fortran pointers are not first class citizens, so a pointer variable is the
pointer's target.

I would say that gfc_build_class_symbol should look at the attr-target instead
of attr-pointer, but I don't know how much fallout would come from that.


[Bug c++/44613] Declaring an array with non-constant length inside a switch corrupts stack pointer.

2014-04-04 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44613

--- Comment #9 from Jason Merrill jason at gcc dot gnu.org ---
Author: jason
Date: Fri Apr  4 19:36:00 2014
New Revision: 209125

URL: http://gcc.gnu.org/viewcvs?rev=209125root=gccview=rev
Log:
PR c++/44613
* semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
* decl.c (cp_finish_decl): Create a new BIND_EXPR before
instantiating a variable-sized type.

Added:
trunk/gcc/testsuite/g++.dg/ext/vla15.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/cp/semantics.c


[Bug c++/21113] Jumps into VLA or VM scope not rejected for C++

2014-04-04 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21113

--- Comment #3 from Jason Merrill jason at gcc dot gnu.org ---
Author: jason
Date: Fri Apr  4 19:35:54 2014
New Revision: 209124

URL: http://gcc.gnu.org/viewcvs?rev=209124root=gccview=rev
Log:
PR c++/21113
* decl.c (decl_jump_unsafe): Consider variably-modified decls.

Added:
trunk/gcc/testsuite/g++.dg/ext/vla14.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c


[Bug c++/55004] [meta-bug] constexpr issues

2014-04-04 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55004
Bug 55004 depends on bug 58207, which changed state.

Bug 58207 Summary: [4.7/4.8/4.9 Regression] ICE in 
sort_constexpr_mem_initializers due to out of bounds vector access
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58207

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED


[Bug c++/58207] [4.7/4.8/4.9 Regression] ICE in sort_constexpr_mem_initializers due to out of bounds vector access

2014-04-04 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58207

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Assignee|paolo.carlini at oracle dot com|unassigned at gcc dot 
gnu.org
   Target Milestone|4.7.4   |4.9.0

--- Comment #7 from Paolo Carlini paolo.carlini at oracle dot com ---
Fixed for 4.9.0.


[Bug c++/58207] [4.7/4.8/4.9 Regression] ICE in sort_constexpr_mem_initializers due to out of bounds vector access

2014-04-04 Thread paolo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58207

--- Comment #6 from paolo at gcc dot gnu.org paolo at gcc dot gnu.org ---
Author: paolo
Date: Fri Apr  4 20:11:47 2014
New Revision: 209128

URL: http://gcc.gnu.org/viewcvs?rev=209128root=gccview=rev
Log:
/cp
2014-04-04  Paolo Carlini  paolo.carl...@oracle.com

PR c++/58207
* semantics.c (sort_constexpr_mem_initializers): Robustify loop.

/testsuite
2014-04-04  Paolo Carlini  paolo.carl...@oracle.com

PR c++/58207
* g++.dg/cpp0x/constexpr-ice15.C: New.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-ice15.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/ChangeLog


[Bug fortran/60718] Test case gfortran.dg/select_type_4.f90 fails on ARM

2014-04-04 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60718

--- Comment #8 from Tobias Burnus burnus at gcc dot gnu.org ---
(In reply to Bernd Edlinger from comment #6)
 maybe the test case is wrong, passing one flavor of object to
 another?
 -   class(node_type), target :: new_node  
 +   class(node_type), pointer, intent(in) :: new_node  

The code as is currently is perfectly valid.

gfortran generates for fixed-size arrays, those for nonallocatable/nonpointer
tyoes and for allocatable (both with TYPE_QUAL_RESTRICT for the address) and
pointer arrays different types - see gfc_build_array_type and for fixed-size
arrays gfc_get_nodesc_array_type.

And for polymorphic types, it wraps it in another struct type, one with the
pointer to the virtual table and one containing the array.

I think one solution would be to create a temporary variable of the target type
(here: nonallocatable) - and assign to that temporary variable.


[Bug bootstrap/60620] missing gnattools dependency causes highly parallel build failure with --disable-bootstrap

2014-04-04 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60620

--- Comment #3 from Eric Botcazou ebotcazou at gcc dot gnu.org ---
Author: ebotcazou
Date: Fri Apr  4 20:53:48 2014
New Revision: 209129

URL: http://gcc.gnu.org/viewcvs?rev=209129root=gccview=rev
Log:
PR bootstrap/60620
* Makefile.def (dependencies): Make gnattools depend on libstdc++-v3. 
* Makefile.in: Regenerate.

Modified:
trunk/ChangeLog
trunk/Makefile.def
trunk/Makefile.in


[Bug bootstrap/60620] missing gnattools dependency causes highly parallel build failure with --disable-bootstrap

2014-04-04 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60620

Eric Botcazou ebotcazou at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #4 from Eric Botcazou ebotcazou at gcc dot gnu.org ---
Patch applied.


[Bug fortran/60718] Test case gfortran.dg/select_type_4.f90 fails on ARM

2014-04-04 Thread bernd.edlinger at hotmail dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60718

--- Comment #9 from Bernd Edlinger bernd.edlinger at hotmail dot de ---
yes, thanks. When the test case is valid, then probably the IL is invalid.

append_node (struct list_type  restrict list, struct
__class_poly_list_Node_type  new_node)
{
  if (list-head._data == 0B)
{
  list-head = VIEW_CONVERT_EXPRstruct
__class_poly_list_Node_type_p(*new_node);
}
  L.4:;
  if (list-tail._data != 0B)
{
  list-tail._data-next = VIEW_CONVERT_EXPRstruct
__class_poly_list_Node_type_p(*new_node);
}
  L.5:;
  list-tail = VIEW_CONVERT_EXPRstruct
__class_poly_list_Node_type_p(*new_node);
  return;
}

MAIN__ ()
{
  static struct list_type list = {.head={._data=0B,
._vptr=__vtab_poly_list_Node_type}, .tail={._data=0B,
._vptr=__vtab_poly_list_Node_type}};
  struct __class_poly_list_Node_type_p node;

  node._data = (struct node_type *) __builtin_malloc (8);
  if (node._data == 0B)
{
  _gfortran_os_error (Reservierung würde Speichergrenze
überschreiten[1]{lb: 1 sz: 1});
}
  (struct __vtype_poly_list_Node_type *) node._vptr =
__vtab_poly_list_Node_type;
  (void) __builtin_memcpy ((void *) node._data, (void *) node._vptr-_def_init,
(character(kind=4)) node._vptr-_size);
  append_node (list, node);
  destroy_list (list);
}

maybe we need a type-cast in the call statement?

  append_node (list, VIEW_CONVERT_EXPRstruct __class_poly_list_Node_type
*(node));

[Bug c++/39730] incomplete type error can be misleading

2014-04-04 Thread javiercruz_94 at hotmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39730

Javier Cruz javiercruz_94 at hotmail dot com changed:

   What|Removed |Added

 CC||javiercruz_94 at hotmail dot 
com

--- Comment #2 from Javier Cruz javiercruz_94 at hotmail dot com ---
Yo have to add the library fstream at the beginning.
Example:
#include fstream


That will fix the problem =)


[Bug rtl-optimization/60155] ICE: in get_pressure_class_and_nregs at gcse.c:3438

2014-04-04 Thread danglin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60155

--- Comment #13 from John David Anglin danglin at gcc dot gnu.org ---
Author: danglin
Date: Fri Apr  4 22:25:51 2014
New Revision: 209134

URL: http://gcc.gnu.org/viewcvs?rev=209134root=gccview=rev
Log:
PR rtl-optimization/60155
* gcse.c (record_set_data): New function.
(single_set_gcse): New function.
(gcse_emit_move_after): Use single_set_gcse instead of single_set.
(hoist_code): Likewise.
(get_pressure_class_and_nregs): Likewise.


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


[Bug rtl-optimization/60155] ICE: in get_pressure_class_and_nregs at gcse.c:3438

2014-04-04 Thread danglin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60155

John David Anglin danglin at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #14 from John David Anglin danglin at gcc dot gnu.org ---
Fixed on trunk.


[Bug c++/60764] New: Bogus -Wnonnull warning against constructors declared with __attribute__ ((nonnull(1)))

2014-04-04 Thread patrick at parcs dot ath.cx
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60764

Bug ID: 60764
   Summary: Bogus -Wnonnull warning against constructors declared
with __attribute__ ((nonnull(1)))
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: patrick at parcs dot ath.cx

$ cat this.cc
struct Foo
{
  Foo () __attribute__ ((nonnull(1)));
};

void
foo ()
{
  Foo ();
}
$ g++ -Wnonnull -c this.cc
this.cc: In function ‘void foo()’:
this.cc:9:8: warning: null argument where non-null required (argument 1)
[-Wnonnull]
   Foo ();
^

[Bug c++/39730] incomplete type error can be misleading

2014-04-04 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39730

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||diagnostic
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-04-04
 Ever confirmed|0   |1


[Bug c++/60765] New: Function attributes ignored for pointer-to-member-function parameters

2014-04-04 Thread patrick at parcs dot ath.cx
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60765

Bug ID: 60765
   Summary: Function attributes ignored for
pointer-to-member-function parameters
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: patrick at parcs dot ath.cx

$ cat this.cc
struct Foo;

void foo (int (Foo::*) () __attribute__ ((returns_nonnull)));
$ g++ this.cc -c
this.cc:4:55: warning: ‘returns_nonnull’ attribute directive ignored
[-Wattributes]
 foo (int (Foo::*) () __attribute__ ((returns_nonnull)));
   ^

[Bug tree-optimization/60766] New: Wrong optimization with -O2

2014-04-04 Thread mirzayanovmr at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60766

Bug ID: 60766
   Summary: Wrong optimization with -O2
   Product: gcc
   Version: 4.8.2
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mirzayanovmr at gmail dot com

Created attachment 32546
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=32546action=edit
Compile with -O2 and input 9

Compile the following code with -O2:

~
#include cstdlib
#include iostream
#include cstdio

using namespace std;

int main() {
int n;
cin  n;

for (int x = 0; x = n; x++) {
if (n == x + (x + 1) + (x + 2)) {
cout  x + 2 x + 1 x  endl;
exit(0);
}
}
cout  -1  endl;
return 0;
}
~

Start binary and enter 9

It will print -1, but expected output is 4 3 2.


[Bug c++/60765] Function attributes ignored for pointer-to-member-function parameters

2014-04-04 Thread patrick at parcs dot ath.cx
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60765

--- Comment #1 from patrick at parcs dot ath.cx ---
Oops, that warning is because I am currently compiling with G++ 4.8, which
doesn't implement returns_nonnull.  Here's a better test case:

$ cat this.cc
struct Foo;

void foo (void (Foo::*) () __attribute__ ((nonnull)));
void bar (void (*) () __attribute__ ((nonnull)));

$ g++ this.cc c
this.cc:3:52: warning: ‘nonnull’ attribute only applies to function types
[-Wattributes]
 void foo (void (Foo::*) () __attribute__ ((nonnull)));
^

[Bug c++/60764] Bogus -Wnonnull warning against constructors declared with __attribute__ ((nonnull(1)))

2014-04-04 Thread patrick at parcs dot ath.cx
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60764

--- Comment #1 from patrick at parcs dot ath.cx ---
I will try to resolve this.


[Bug c++/60765] Function attributes ignored for pointer-to-member-function parameters

2014-04-04 Thread patrick at parcs dot ath.cx
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60765

--- Comment #2 from patrick at parcs dot ath.cx ---
I will try to resolve this.


[Bug tree-optimization/60766] [4.8/4.9 Regression] Wrong optimization with -O2

2014-04-04 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60766

Andrew Pinski pinskia at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||wrong-code
 Target||x86_64-*-*-*
  Known to work||4.4.5
   Target Milestone|--- |4.8.3
Summary|Wrong optimization with -O2 |[4.8/4.9 Regression] Wrong
   ||optimization with -O2
  Known to fail||4.9.0

--- Comment #1 from Andrew Pinski pinskia at gcc dot gnu.org ---
Looks like IV-opt is creating some overflows that were not there in the
original code.

Fails with:
g++ (GCC) 4.9.0 20131026 (experimental) [trunk revision 204095]


I have not updated my compiler since then.


[Bug c++/60767] New: [ICE] [c++11] [4.8.2] use of using inside template causes failure in retreive_specialization

2014-04-04 Thread zreed1 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60767

Bug ID: 60767
   Summary: [ICE] [c++11] [4.8.2] use of using inside template
causes failure in retreive_specialization
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zreed1 at gmail dot com

The follow code fails on g++4.8.2, but compiles successfully with clang.

=
template typename _T, int _N
  struct Impl;

template typename _T
  struct Impl_T,0
{};

template  typename _Tag, typename _T
  typename _Tag::template impl _T  get_impl();

template int _N
  struct Tag 
{
  template typename _T
using impl = Impl_T,_N;
};

int main()
{ 
  get_impl Tag0, void ();
}

=

test.cpp: In substitution of ‘templateclass _T using impl = Impl_T, 0 [with
_T = 0]’: 
│  ~
test.cpp:9:38:   required by substitution of ‘templateclass _Tag, class _T
typename _Tag::impl_T get_impl() [with _Tag = Tag0; _T = void]’
  │  ~  
test.cpp:22:28:   required from here   
  
│  ~
test.cpp:16:29: internal compiler error: in retrieve_specialization, at
cp/pt.c:1021   
   │  ~ 
 using impl = Impl_T,_N; 


=

the following similar code compiles successfuly 


=
template typename _T, int _N
  struct Impl;

template typename _T
  struct Impl_T,0
{};

template  typename _Tag, typename _T
  typename _Tag::template impl _T ::type get_impl();

template int _N
  struct Tag 
{
  template typename _T
struct impl
  { typedef Impl_T,_N type; };
};

int main()
{

  get_impl Tag0, void ();

}

[Bug tree-optimization/60656] [4.8/4.9 regression] x86 vectorization produces wrong code

2014-04-04 Thread congh at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60656

--- Comment #8 from Cong Hou congh at gcc dot gnu.org ---
Author: congh
Date: Sat Apr  5 01:27:21 2014
New Revision: 209138

URL: http://gcc.gnu.org/viewcvs?rev=209138root=gccview=rev
Log:
2014-04-04  Cong Hou  co...@google.com

PR tree-optimization/60656
* tree-vect-stmts.c (supportable_widening_operation):
  Fix a bug that elements in a vector with vect_used_by_reduction
  property are incorrectly reordered when the operation on it is not
  consistant with the one in reduction operation.

2014-04-04  Cong Hou  co...@google.com

PR tree-optimization/60656
* gcc.dg/vect/pr60656.c: New test.


Added:
trunk/gcc/testsuite/gcc.dg/vect/pr60656.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-stmts.c