[Bug target/57896] [4.7 Regression] ICE in expand_expr_real_2

2014-02-21 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57896

Uroš Bizjak  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
URL||http://gcc.gnu.org/ml/gcc-p
   ||atches/2014-02/msg01255.htm
   ||l
 Resolution|--- |FIXED

--- Comment #35 from Uroš Bizjak  ---
Fixed everywhere.

[Bug target/60298] New: [ARM/Thumb1] ICE caused by LRA for case pr54713-1.c

2014-02-21 Thread terry.guo at arm dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60298

Bug ID: 60298
   Summary: [ARM/Thumb1] ICE caused by LRA for case pr54713-1.c
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: terry.guo at arm dot com

Created attachment 32185
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32185&action=edit
case to reproduce the ICE

This issue is found during regression test of latest trunk for Thumb-1 target
Cortex-M0. Here is command to reproduce this issue:

terguo01@terry-pc01:case$ ../install-native/bin/arm-none-eabi-gcc  -O0 -w -c
-mthumb -mcpu=cortex-m0 -o pr54713-1.o pr54713-1.c 
pr54713-1.c: In function 'f10':
pr54713-1.c:70:1: internal compiler error: Segmentation fault
 }
 ^
0xb1b7ce crash_signal
/myssd/terguo01/toolchain-build/lra-regression/src/gcc/gcc/toplev.c:337
0xaeccbf simplify_replace_fn_rtx(rtx_def*, rtx_def const*, rtx_def*
(*)(rtx_def*, rtx_def const*, void*), void*)
   
/myssd/terguo01/toolchain-build/lra-regression/src/gcc/gcc/simplify-rtx.c:417
0x9a6df3 update_equiv
   
/myssd/terguo01/toolchain-build/lra-regression/src/gcc/gcc/lra-constraints.c:351
0x9b06e7 lra_constraints(bool)
   
/myssd/terguo01/toolchain-build/lra-regression/src/gcc/gcc/lra-constraints.c:4054
0x99d609 lra(_IO_FILE*)
/myssd/terguo01/toolchain-build/lra-regression/src/gcc/gcc/lra.c:2339
0x94b7af do_reload
/myssd/terguo01/toolchain-build/lra-regression/src/gcc/gcc/ira.c:5457
0x94baf8 rest_of_handle_reload
/myssd/terguo01/toolchain-build/lra-regression/src/gcc/gcc/ira.c:5598
0x94bb42 execute
/myssd/terguo01/toolchain-build/lra-regression/src/gcc/gcc/ira.c:5627
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.


[Bug c/60296] Confusing -Wformat warning on invalid format string

2014-02-21 Thread sch...@linux-m68k.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60296

--- Comment #1 from Andreas Schwab  ---
For the % conversion there are no modifiers defined, so gcc stops before the
second %, parsing the rest as %*d, which requires two arguments.


[Bug c++/60299] New: [C++11] Copy constructor calls itself if base class has a constructor which is a variadic function template

2014-02-21 Thread m.lederhil...@ds-automotion.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60299

Bug ID: 60299
   Summary: [C++11] Copy constructor calls itself if base class
has a constructor which is a variadic function
template
   Product: gcc
   Version: 4.8.2
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: m.lederhil...@ds-automotion.com

I have made a small example (see attachment) which exhibits the problem.

The generated copy constructor of class C calls itself, and then the base
class's constructor - see disassembly (see attachment of gdb session). This
results in an infinite recursion.


[Bug c++/60299] [C++11] Copy constructor calls itself if base class has a constructor which is a variadic function template

2014-02-21 Thread m.lederhil...@ds-automotion.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60299

--- Comment #2 from Martin Lederhilger  ---
Created attachment 32187
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32187&action=edit
Command line used to build the example


[Bug c++/60299] [C++11] Copy constructor calls itself if base class has a constructor which is a variadic function template

2014-02-21 Thread m.lederhil...@ds-automotion.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60299

--- Comment #1 from Martin Lederhilger  ---
Created attachment 32186
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32186&action=edit
Example which exhibits the probelm


[Bug c++/60299] [C++11] Copy constructor calls itself if base class has a constructor which is a variadic function template

2014-02-21 Thread m.lederhil...@ds-automotion.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60299

--- Comment #3 from Martin Lederhilger  ---
Created attachment 32188
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32188&action=edit
GDB session which shows the disassembly of C's copy constructor


[Bug target/60298] [ARM/Thumb1] ICE caused by LRA for case pr54713-1.c

2014-02-21 Thread terry.guo at arm dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60298

--- Comment #1 from Terry Guo  ---
I did a little investigation and think the issue may be related to following
code from function remove_some_program_points_and_update_live_ranges:

782  max_regno = max_reg_num ();
783  for (i = FIRST_PSEUDO_REGISTER; i < (unsigned) max_regno; i++)
784{
785  for (r = lra_reg_info[i].live_ranges; r != NULL; r = r->next)
786{
787  lra_assert (r->start <= r->finish);
788  bitmap_set_bit (born, r->start);
789  bitmap_set_bit (dead, r->finish);
790}
791}

The max_regno is 575, while the length of array lra_reg_info is just 568. When
the loop index i is 568, the issue is triggered.


[Bug fortran/60286] INQUIRE reports STDOUT as not writable

2014-02-21 Thread a.vogt at fulguritus dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60286

--- Comment #5 from Alexander Vogt  ---
Thanks for fixing it *that* fast (I'm impressed)!


[Bug go/60288] gccgo crashes compiling '*func_ptr(0)'

2014-02-21 Thread vogt at linux dot vnet.ibm.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60288

Dominik Vogt  changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

--- Comment #5 from Dominik Vogt  ---
Fix for both symptoms verified.


[Bug fortran/60234] [4.9 Regression] [OOP] ICE in generate_finalization_wrapper at fortran/class.c:1883

2014-02-21 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60234

--- Comment #8 from janus at gcc dot gnu.org ---
Author: janus
Date: Fri Feb 21 09:06:57 2014
New Revision: 207986

URL: http://gcc.gnu.org/viewcvs?rev=207986&root=gcc&view=rev
Log:
2014-02-21  Janus Weil  

PR fortran/60234
* gfortran.h (gfc_build_class_symbol): Removed argument.
* class.c (gfc_add_component_ref): Fix up missing vtype if necessary.
(gfc_build_class_symbol): Remove argument 'delayed_vtab'. vtab is always
delayed now, except for unlimited polymorphics.
(comp_is_finalizable): Procedure pointer components are not finalizable.
* decl. (build_sym, build_struct, attr_decl1): Removed argument of
'gfc_build_class_symbol'.
* match.c (copy_ts_from_selector_to_associate, select_type_set_tmp):
Ditto.
* symbol.c (gfc_set_default_type): Ditto.


2014-02-21  Janus Weil  

PR fortran/60234
* gfortran.dg/finalize_23.f90: New.

Added:
trunk/gcc/testsuite/gfortran.dg/finalize_23.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/class.c
trunk/gcc/fortran/decl.c
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/match.c
trunk/gcc/fortran/symbol.c
trunk/gcc/testsuite/ChangeLog


[Bug fortran/60234] [4.9 Regression] [OOP] ICE in generate_finalization_wrapper at fortran/class.c:1883

2014-02-21 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60234

janus at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #9 from janus at gcc dot gnu.org ---
Fixed with r207986. Closing.


[Bug c/60291] slow compile times for any mode (-O0/-O1/-O2) on large .c source file (30MBs)

2014-02-21 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60291

--- Comment #9 from Richard Biener  ---
Ok, so the rest is hash collisions in the mem-attrs hash.  We also do useless
work here:

case MEM_REF:
  {
addr_space_t as
  = TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (TREE_OPERAND (exp, 0;
...
set_mem_attributes (temp, exp, 0);
set_mem_addr_space (temp, as);

set_mem_attributes already handles MEM_REFs properly:

  /* Address-space information is on the base object.  */
  if (TREE_CODE (base) == MEM_REF
  || TREE_CODE (base) == TARGET_MEM_REF)
as = TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (TREE_OPERAND (base,
  0;

so removing that would cut expand time in half.  Oh, and expand_debug_expr
even gets addr-spaces wrong (in cfgexpand.c).

We have 1107000 callso to set_mem_attrs but 151459000 calls to
mem_attrs_htab_eq.
The hash function is somewhat ad-hoc apart from hashing MEM_EXPR via
iterative_hash_expr.  We hash MEM_REFs via hashing their operands
recursively but we compare them more strictly factoring in properties
of types involved.  I don't see an easy way to make the hashing stronger
(given PR58521 and its fix).  There is always the old idea of simply
removing that mem_attr sharing completely ...

At -O0 we could simply always force a NULL_TREE MEM_EXPR for example.


[Bug middle-end/60221] [4.7/4.8 Regression] gcc -fexceptions generates unnecessary cleanup code

2014-02-21 Thread rguenther at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60221

--- Comment #7 from rguenther at suse dot de  ---
On Thu, 20 Feb 2014, redlizard at redlizard dot nl wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60221
> 
> --- Comment #6 from Ruud Koolen  ---
> This fix solves my original problem. Resolved, as far as I'm concerned.
> 
> Will this fix also be applied to 4.7 and 4.8?

After some time and no problems show up, yes.  I expect it to hit
4.8.3 at least, not sure about 4.7.


[Bug c/60291] slow compile times for any mode (-O0/-O1/-O2) on large .c source file (30MBs)

2014-02-21 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60291

--- Comment #10 from Richard Biener  ---
(In reply to Jakub Jelinek from comment #8)
> Won't that break with function-local statics?  Those can certainly refer to
> other function-local static, with this patch gcc might think the other ones
> are unused.  I mean something like:
> 
> int **
> foo (void)
> {
>   static int a = 0;
>   static int *b = &a;
>   static int **c = &b;
>   return c;
> }

int **
foo (void)
{
  static int a = 0;
  static int *b = &a;
  static int **c = &b;
  return c;
}
int main()
{
  return **foo();
}

I can still step into foo() and print a, b and c when compiling with
-O -fno-inline -g (I cannot seem to step into foo with inlining enabled,
but that doesn't work without the patch either - didn't expect that
because we cannot preserve DECL_INITIAL in the inlined blocks).


[Bug middle-end/60292] [4.9 Regression] ICE: in fill_vec_av_set, at sel-sched.c:3863 with -m64 after r206174 on powerpc-apple-darwin9.8.0

2014-02-21 Thread abel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60292

--- Comment #2 from Andrey Belevantsev  ---
Here the assert added while fixing PR 57422 means that we should always be able
to schedule the current fence instruction.  The PR 57422 analysis was good but
for the added assert we should make one more conclusion from it.  In that PR
case, we did the following: 1) reset the fence insn target register
availability because this insn form was scheduled earlier and the pre-computed
availability might be wrong; 2) then properly recompute the possible registers
for this insn and rename it.

The part 2) had the bug which was fixed.  Now, in this PR we also reset the
availability as in the part 1) and then fail to recompute the possible renaming
registers because of the --param limitation to apply the renaming to the most
important insns.  But we are required to do this for the fence insn always if
we want so satisfy the correctness assert I have inserted for the PR 57422.  So
either we always should try renaming for the fence insn, or, easier, not doing
the part 1) (resetting the precomputed availability for the fence insn) at all.
 The unavailable vinsns business was introduced for the case when we schedule
an insn on some fence with renaming and this can invalidate the availability
bits for this insn on the other fence; for the next (fence) insn it is safe to
skip it.

So the below simple patch fixes the test case.  I have looked through the code
to ensure that no other issues like this should arise and so then further
firings of this assert should uncover real bugs (hopefully).

Also, the --param renaming limitation as the reason of this particular bug is
easily verified, as the test case passes with --param
selsched-insns-to-rename=3 (instead of 2, the default).

Dominique, I don't have a darwin machine, can you help me with testing this
patch on darwin?  I will do the x86-64 and ia64.

diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c
index 490f361..241bdad 100644
--- a/gcc/sel-sched.c
+++ b/gcc/sel-sched.c
@@ -3823,7 +3823,8 @@ fill_vec_av_set (av_set_t av, blist_t bnds, fence_t
fence,

   /* If insn was already scheduled on the current fence,
 set TARGET_AVAILABLE to -1 no matter what expr's attribute says.  */
-  if (vinsn_vec_has_expr_p (vec_target_unavailable_vinsns, expr))
+  if (vinsn_vec_has_expr_p (vec_target_unavailable_vinsns, expr)
+ && !fence_insn_p)
target_available = -1;

   /* If the availability of the EXPR is invalidated by the insertion of


[Bug tree-optimization/56490] [4.7/4.8/4.9 Regression] -Wall triggering infinite loop

2014-02-21 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56490

--- Comment #9 from Jakub Jelinek  ---
Author: jakub
Date: Fri Feb 21 09:53:56 2014
New Revision: 207988

URL: http://gcc.gnu.org/viewcvs?rev=207988&root=gcc&view=rev
Log:
PR tree-optimization/56490
* params.def (PARAM_UNINIT_CONTROL_DEP_ATTEMPTS): New param.
* tree-ssa-uninit.c: Include params.h.
(compute_control_dep_chain): Add num_calls argument, return false
if it exceed PARAM_UNINIT_CONTROL_DEP_ATTEMPTS param, pass
num_calls to recursive call.
(find_predicates): Change dep_chain into normal array,
cur_chain into auto_vec, add num_calls
variable and adjust compute_control_dep_chain caller.
(find_def_preds): Likewise.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/params.def
trunk/gcc/tree-ssa-uninit.c


[Bug middle-end/60291] slow compile times for any mode (-O0/-O1/-O2) on large .c source file (30MBs)

2014-02-21 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60291

--- Comment #11 from Richard Biener  ---
With the redundant set_mem_addr_space removed -Og now takes

 expand  :  19.21 (31%) usr   0.60 ( 8%) sys  20.06 (29%) wall 
165633 kB ( 8%) ggc
 TOTAL :  61.60 7.5869.16   
2047648 kB

collisions are like

MEM[(StgWord *)_5 + -64B] != MEM[(StgWord *)_5 + -64B]
MEM[(StgWord *)_5 + -64B] != MEM[(StgWord *)_5 + -64B]
MEM[(StgWord *)_5 + -64B] != MEM[(StgWord *)_5 + -64B]
MEM[(StgWord *)_20 + 24B] != MEM[(StgWord *)_5 + -64B]

investigating ... (clearly not having a recorded hash to compare that
quickly with the hashtab collision handling makes things worse here).

Ouch.  This mem-attr hashtable is _global_!  The above _5 are different
SSA name objects (from different functions).  The hash is global because
we also have DECL_RTL for global variables, so we can't really clear it
(well, we could - we'd just lose mem-attr sharing at that points).

Clearing the mem-attrs htab in rest_of_clean_state () gets us to

 phase parsing   :   5.33 (13%) usr   4.41 (58%) sys   9.74 (19%) wall 
294905 kB (14%) ggc
 tree gimplify   :   2.05 ( 5%) usr   0.20 ( 3%) sys   2.05 ( 4%) wall 
252760 kB (12%) ggc
 tree CCP:   1.25 ( 3%) usr   0.13 ( 2%) sys   1.13 ( 2%) wall 
 57081 kB ( 3%) ggc
 expand  :   1.50 ( 4%) usr   0.13 ( 2%) sys   1.63 ( 3%) wall 
169767 kB ( 8%) ggc
 CSE :   1.29 ( 3%) usr   0.12 ( 2%) sys   1.05 ( 2%) wall 
 13532 kB ( 1%) ggc
 combiner:   2.06 ( 5%) usr   0.15 ( 2%) sys   2.10 ( 4%) wall 
 11785 kB ( 1%) ggc
 integrated RA   :   4.51 (11%) usr   0.24 ( 3%) sys   4.30 ( 9%) wall 
427273 kB (21%) ggc
 LRA non-specific:   1.26 ( 3%) usr   0.09 ( 1%) sys   1.40 ( 3%) wall 
  6517 kB ( 0%) ggc
 reload CSE regs :   1.19 ( 3%) usr   0.06 ( 1%) sys   1.40 ( 3%) wall 
 13638 kB ( 1%) ggc
 rest of compilation :   2.31 ( 5%) usr   0.18 ( 2%) sys   2.20 ( 4%) wall 
 40076 kB ( 2%) ggc
 TOTAL :  42.32 7.6650.19   
2052932 kB


[Bug c++/60299] [C++11] Copy constructor calls itself if base class has a constructor which is a variadic function template

2014-02-21 Thread m.lederhil...@ds-automotion.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60299

--- Comment #4 from Martin Lederhilger  ---
Interestingly clang-3.4 produces the same result - is my program somehow wrong?


[Bug tree-optimization/56490] [4.7/4.8 Regression] -Wall triggering infinite loop

2014-02-21 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56490

Jakub Jelinek  changed:

   What|Removed |Added

  Known to work||4.9.0
Summary|[4.7/4.8/4.9 Regression]|[4.7/4.8 Regression] -Wall
   |-Wall triggering infinite   |triggering infinite loop
   |loop|

--- Comment #10 from Jakub Jelinek  ---
Hopefully fixed/worked around on the trunk.


[Bug middle-end/60291] slow compile times for any mode (-O0/-O1/-O2) on large .c source file (30MBs)

2014-02-21 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60291

--- Comment #12 from Richard Biener  ---
-O0 time with both patches

 phase parsing   :   6.34 (17%) usr   5.18 (71%) sys  11.53 (25%) wall 
294905 kB (15%) ggc
 tree gimplify   :   2.17 ( 6%) usr   0.19 ( 3%) sys   2.40 ( 5%) wall 
323021 kB (16%) ggc
 expand  :   2.66 ( 7%) usr   0.13 ( 2%) sys   2.64 ( 6%) wall 
262544 kB (13%) ggc
 integrated RA   :   8.86 (24%) usr   0.32 ( 4%) sys   8.48 (18%) wall 
482040 kB (24%) ggc
 TOTAL :  37.29 7.3446.18   
1992937 kB


[Bug c++/60253] [4.7/4.8/4.9 Regression] ICE passing class object through ellipsis (...)

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

Paolo Carlini  changed:

   What|Removed |Added

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


[Bug lto/60295] [4.9 Regression] Too many lto1-wpa-stream processes are forked

2014-02-21 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60295

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |4.9.0


[Bug middle-end/60292] [4.9 Regression] ICE: in fill_vec_av_set, at sel-sched.c:3863 with -m64 after r206174 on powerpc-apple-darwin9.8.0

2014-02-21 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60292

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |4.9.0


[Bug middle-end/60291] [4.7/4.8/4.9 Regression] slow compile times for any mode (-O0/-O1/-O2) on large .c source file (30MBs)

2014-02-21 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60291

Richard Biener  changed:

   What|Removed |Added

  Known to work||4.3.6
   Target Milestone|--- |4.7.4
Summary|slow compile times for any  |[4.7/4.8/4.9 Regression]
   |mode (-O0/-O1/-O2) on large |slow compile times for any
   |.c source file (30MBs)  |mode (-O0/-O1/-O2) on large
   ||.c source file (30MBs)

--- Comment #13 from Richard Biener  ---
GCC 4.3 needs 22.5s at -O0.  GCC 4.7 doesn't exhibit the unused-vars-remove
slowness:

 expand  :  46.53 (42%) usr   0.96 ( 9%) sys  47.17 (39%) wall 
173344 kB ( 7%) ggc
 remove unused locals:   0.56 ( 1%) usr   0.07 ( 1%) sys   0.48 ( 0%) wall 
 0 kB ( 0%) ggc
 TOTAL : 110.4510.58   121.70   
2343278 kB


[Bug c++/60254] [4.7/4.8/4.9 Regression] [c++11] ICE with non-const expression in static_assert

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

--- Comment #2 from Paolo Carlini  ---
The second issue is a Dup of PR60215.


[Bug c++/60299] [C++11] Copy constructor calls itself if base class has a constructor which is a variadic function template

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

Daniel Krügler  changed:

   What|Removed |Added

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

--- Comment #5 from Daniel Krügler  ---
The observed behaviour is to be expected, because B's variadic constructors
deduces from the given parameter list a single argument of type C and like
every other function with non-reference arguments this will invoke the
copy-constructor of the corresponding argument type. Bad idea to try something
like this within a copy-constructor ;-)

[Bug target/60300] New: [avr] Suboptimal stack pointer manipulation for frame setup

2014-02-21 Thread matthijs at stdin dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60300

Bug ID: 60300
   Summary: [avr] Suboptimal stack pointer manipulation for frame
setup
   Product: gcc
   Version: 4.8.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: matthijs at stdin dot nl

For setting up the stack frame in the function prologue, gcc chooses between
either directly manipulation the stack pointer with "rcall ." and "push"
instructions, or copying it to the frame pointer, modifying that and copying it
back, depending on which is shorter.

However, when the frame size is 7 or more, gcc picks the frame-pointer
approach, even when the direct manipulation approach would be shorter.

Here's the example (lines with dashes added by me to indicate the
relevant code

$ cat foo.c
#include 

void bar(uint8_t *);

void foo() {
uint8_t x[SIZE];
bar(x);
}

$ diff -u <(avr-gcc -DSIZE=6 -c foo.c -o - -S) <(avr-gcc -D SIZE=7 -c foo.c -o
- -S)
--- /dev/fd/63  2014-02-21 13:04:18.531142523 +0100
+++ /dev/fd/62  2014-02-21 13:04:18.535142628 +0100
@@ -10,21 +10,24 @@
 foo:
push r28
push r29
-   rcall .
-   rcall .
-   rcall .
in r28,__SP_L__
in r29,__SP_H__
+   sbiw r28,7
+   in __tmp_reg__,__SREG__
+   cli
+   out __SP_H__,r29
+   out __SREG__,__tmp_reg__
+   out __SP_L__,r28
 /* prologue: function */
-/* frame size = 6 */
-/* stack size = 8 */
-.L__stack_usage = 8
+/* frame size = 7 */
+/* stack size = 9 */
+.L__stack_usage = 9
mov r24,r28
mov r25,r29
adiw r24,1
rcall bar
 /* epilogue start */
-   adiw r28,6
+   adiw r28,7
in __tmp_reg__,__SREG__
cli
out __SP_H__,r29

As you can see, for SIZE=7 it switches to a 6-instruction sequence, when a
4-instruction sequence (3x rcall + 1x push) would also suffice.


Relevant code seems to be avr_prologue_setup_frame and avr_out_addto_sp:
 -
https://github.com/mirrors/gcc/blob/c2e306f5efb32b7eed856a1844487cff09aa86ac/gcc/config/avr/avr.c#L1109-L1278
 -
https://github.com/mirrors/gcc/blob/c2e306f5efb32b7eed856a1844487cff09aa86ac/gcc/config/avr/avr.c#L7002-L7014

That code tries both approaches to see which one is smaller, so
presumably it gets the size of either of them wrong and thus makes the
wrong decision.



Note that for the epilogue, the compiler has the turnover point at the expected
5/6 bytes of frame size:

$ diff -u <(avr-gcc -DSIZE=5 -c foo.c -o - -S) <(avr-gcc -D SIZE=6 -c foo.c -o
- -S)
--- /dev/fd/63  2014-02-21 13:05:55.825616219 +0100
+++ /dev/fd/62  2014-02-21 13:05:55.821616121 +0100
@@ -12,23 +12,24 @@
push r29
rcall .
rcall .
-   push __zero_reg__
+   rcall .
in r28,__SP_L__
in r29,__SP_H__
 /* prologue: function */
-/* frame size = 5 */
-/* stack size = 7 */
-.L__stack_usage = 7
+/* frame size = 6 */
+/* stack size = 8 */
+.L__stack_usage = 8
mov r24,r28
mov r25,r29
adiw r24,1
rcall bar
 /* epilogue start */
-   pop __tmp_reg__
-   pop __tmp_reg__
-   pop __tmp_reg__
-   pop __tmp_reg__
-   pop __tmp_reg__
+   adiw r28,6
+   in __tmp_reg__,__SREG__
+   cli
+   out __SP_H__,r29
+   out __SREG__,__tmp_reg__
+   out __SP_L__,r28
pop r29
pop r28
ret


[Bug tree-optimization/55260] [4.8 Regression] ICE: in ipa_get_parm_lattices, at ipa-cp.c:263 with -O2 -fno-inline -fipa-cp-clone

2014-02-21 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55260

--- Comment #18 from Martin Jambor  ---
Author: jamborm
Date: Fri Feb 21 13:05:40 2014
New Revision: 207990

URL: http://gcc.gnu.org/viewcvs?rev=207990&root=gcc&view=rev
Log:
2014-02-21  Martin Jambor  

PR ipa/55260
* ipa-cp.c (cgraph_edge_brings_all_agg_vals_for_node): Uce correct
info when checking whether lattices are bottom.

testsuite/
* gcc.dg/ipa/pr55260.c: New test.


Added:
branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/ipa/pr55260.c
Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/ipa-cp.c
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog


[Bug middle-end/60291] [4.7/4.8/4.9 Regression] slow compile times for any mode (-O0/-O1/-O2) on large .c source file (30MBs)

2014-02-21 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60291

--- Comment #14 from Richard Biener  ---
Author: rguenth
Date: Fri Feb 21 13:14:23 2014
New Revision: 207991

URL: http://gcc.gnu.org/viewcvs?rev=207991&root=gcc&view=rev
Log:
2014-02-21  Richard Biener  

PR middle-end/60291
* tree-ssa-live.c (mark_all_vars_used_1): Do not walk
DECL_INITIAL for globals not in the current function context.

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


[Bug tree-optimization/60276] [4.7/4.8/4.9 Regression] -O3 autovectorizer breaks on a particular loop

2014-02-21 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60276

--- Comment #10 from Richard Biener  ---
Author: rguenth
Date: Fri Feb 21 13:18:54 2014
New Revision: 207992

URL: http://gcc.gnu.org/viewcvs?rev=207992&root=gcc&view=rev
Log:
2014-02-21  Richard Biener  

PR tree-optimization/60276
* tree-vectorizer.h (struct _stmt_vec_info): Add min_neg_dist field.
(STMT_VINFO_MIN_NEG_DIST): New macro.
* tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Record
STMT_VINFO_MIN_NEG_DIST.
* tree-vect-stmts.c (vectorizable_load): Verify if assumptions
made for negative dependence distances still hold.

* gcc.dg/vect/pr60276.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/vect/pr60276.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-data-refs.c
trunk/gcc/tree-vect-stmts.c
trunk/gcc/tree-vectorizer.h


[Bug tree-optimization/60276] [4.7/4.8 Regression] -O3 autovectorizer breaks on a particular loop

2014-02-21 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60276

Richard Biener  changed:

   What|Removed |Added

  Known to work||4.9.0
Summary|[4.7/4.8/4.9 Regression]|[4.7/4.8 Regression] -O3
   |-O3 autovectorizer breaks   |autovectorizer breaks on a
   |on a particular loop|particular loop

--- Comment #11 from Richard Biener  ---
Fixed on trunk sofar.


[Bug c++/60167] [4.9 regression] Bogus error: conflicting declaration

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60167

Jason Merrill  changed:

   What|Removed |Added

   Target Milestone|4.8.3   |4.9.0
Summary|[4.8/4.9 regression] Bogus  |[4.9 regression] Bogus
   |error: conflicting  |error: conflicting
   |declaration |declaration

--- Comment #3 from Jason Merrill  ---
Fixed in 4.8 by reverting the 58606 patch.


[Bug middle-end/60291] [4.7/4.8/4.9 Regression] slow compile times for any mode (-O0/-O1/-O2) on large .c source file (30MBs)

2014-02-21 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60291

--- Comment #15 from Richard Biener  ---
And with http://gcc.gnu.org/ml/gcc-patches/2014-02/msg01314.html we get at -O0

 expand  :   1.59 ( 5%) usr   0.05 ( 1%) sys   1.72 ( 5%) wall 
261220 kB (13%) ggc
 TOTAL :  29.96 6.1736.12   
1991207 kB

and -Og and -O1.

 expand  :   1.03 ( 2%) usr   0.16 ( 2%) sys   1.44 ( 2%) wall 
196031 kB ( 9%) ggc
 TOTAL :  49.82 9.0158.80   
2280015 kB


[Bug c++/60216] [4.8/4.9 Regression] [c++11] Trouble with deleted template functions

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60216

Jason Merrill  changed:

   What|Removed |Added

   Keywords|accepts-invalid |
 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org


[Bug c++/60222] [4.9 Regression] ICE with reference as template parameter

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60222

--- Comment #3 from Jason Merrill  ---
Author: jason
Date: Fri Feb 21 14:00:44 2014
New Revision: 207994

URL: http://gcc.gnu.org/viewcvs?rev=207994&root=gcc&view=rev
Log:
PR c++/60167
PR c++/60222
PR c++/58606
* parser.c (cp_parser_template_argument): Restore dereference.
* pt.c (template_parm_to_arg): Dereference non-pack expansions too.
(process_partial_specialization): Handle deref.
(unify): Likewise.

Added:
trunk/gcc/testsuite/g++.dg/template/ref7.C
trunk/gcc/testsuite/g++.dg/template/ref8.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/cp/pt.c


[Bug c++/60167] [4.9 regression] Bogus error: conflicting declaration

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60167

--- Comment #4 from Jason Merrill  ---
Author: jason
Date: Fri Feb 21 14:00:44 2014
New Revision: 207994

URL: http://gcc.gnu.org/viewcvs?rev=207994&root=gcc&view=rev
Log:
PR c++/60167
PR c++/60222
PR c++/58606
* parser.c (cp_parser_template_argument): Restore dereference.
* pt.c (template_parm_to_arg): Dereference non-pack expansions too.
(process_partial_specialization): Handle deref.
(unify): Likewise.

Added:
trunk/gcc/testsuite/g++.dg/template/ref7.C
trunk/gcc/testsuite/g++.dg/template/ref8.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/cp/pt.c


[Bug c++/58606] [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58606

--- Comment #6 from Jason Merrill  ---
Author: jason
Date: Fri Feb 21 14:00:44 2014
New Revision: 207994

URL: http://gcc.gnu.org/viewcvs?rev=207994&root=gcc&view=rev
Log:
PR c++/60167
PR c++/60222
PR c++/58606
* parser.c (cp_parser_template_argument): Restore dereference.
* pt.c (template_parm_to_arg): Dereference non-pack expansions too.
(process_partial_specialization): Handle deref.
(unify): Likewise.

Added:
trunk/gcc/testsuite/g++.dg/template/ref7.C
trunk/gcc/testsuite/g++.dg/template/ref8.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/cp/pt.c


[Bug c++/60251] [4.9 Regression] [c++11] ICE capturing variable-length array

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60251

--- Comment #4 from Jason Merrill  ---
Author: jason
Date: Fri Feb 21 14:01:20 2014
New Revision: 207995

URL: http://gcc.gnu.org/viewcvs?rev=207995&root=gcc&view=rev
Log:
PR c++/60251
* lambda.c (is_normal_capture_proxy): Handle VLA capture.

Added:
trunk/gcc/testsuite/g++.dg/cpp1y/vla11.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/lambda.c


[Bug c++/60250] [4.9 Regression] [c++1y] ICE using lambda for array size

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60250

--- Comment #3 from Jason Merrill  ---
Author: jason
Date: Fri Feb 21 14:01:29 2014
New Revision: 207996

URL: http://gcc.gnu.org/viewcvs?rev=207996&root=gcc&view=rev
Log:
PR c++/60250
* parser.c (cp_parser_direct_declarator): Don't wrap a
type-dependent expression in a NOP_EXPR.

Added:
trunk/gcc/testsuite/g++.dg/cpp1y/vla12.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c


[Bug fortran/51976] [F2003] Support deferred-length character components of derived types (allocatable string length)

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

--- Comment #14 from Dominique d'Humieres  ---
Hi all,

> I think it went as follows: We found out that some code doesn't - in
> particular code which uses array-valued deferred-length characters.
> After trying to fix it, you (Paul) decided that the simplest way to fix
> it would be the new array descriptor - and then it got stuck.

A list of known problems can be found at

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51976#c8

> Regarding this patch, I have mixed feelings.  I think it is a much wished
> feature - but I am not sure about the stability of the patch and it is
> rather large, given that we are in stage 4.

I have the patch in my working tree since more than a year without any 
related problem. Indeed I had to practice minor surgery to keep it alive.
AFAICT the changes are quite localized and I don't expect any major 
problem if it is committed.

> Regarding the new array descriptor: I think it would be useful if we
> could get the new descriptor working early in the GCC 4.10/5.0/2015
> development stage.  I think the main large task is to convert all all
> remaining stride-based code to stride-multiplier code without breaking
> vectorization and causing other regressions.  Additionally, it would be
> nice to get rid of "offset" - and have in the descriptor always an
> lower_bound of 0, except for pointers/allocatables (cf.  TS29113).  I
> think the version on the branch is in a relatively good shape; however,
> the stride and offset changes seem to be of such a kind that one needs to
> modify several code locations simultaneously - otherwise, it will break
> badly.  Additionally, all remaining regressions have to be fixed.  When
> that's done, adding some extra field is all what's needed.  (As follow
> up, enough remains to be done: I'd like to use it for all class(*),
> possibly even for nonarray class(type), assumed-rank needs an update,
> assumed-shape/-rank/deferred-shape character arrays also have to be
> adapted (also mandated by TS29113 for interop).  And we should do an ABI
> cleanup in libgfortran as we have now the chance to break the ABI.) - Is
> anyone volunteering?

I think the new array descriptor should be given the highest priority and 
fortran-dev merged to trunk as soon as the last regression is fixed. My 
tests show that its present state is quite close (note regtesting should 
be done for both -m32 and -m64: some scanning tests fail with -m32).

Cheers,

Dominique


[Bug target/60301] New: cross compiler for android: multiple definition of TARGET_POSIX_IO

2014-02-21 Thread valeryweber at hotmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60301

Bug ID: 60301
   Summary: cross compiler for android: multiple definition of
TARGET_POSIX_IO
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: valeryweber at hotmail dot com

Dear 

while building a cross gcc (trunk) for android (ndk-r9c toolchains). 
I get a multiple definition of TARGET_POSIX_IO (see bellow). 
Getting rid of it makes the thing compile fine.

Thanks

v


./build/tools/build-gcc.sh  --build-out=/home/vwe/libs/gcc/test/tmp2
--binutils-version=2.22.90 --mpfr-version=3.1.2 --mpc-version=1.0
--gmp-version=5.1.3 --gdb-version=7.7 --cloog-version=0.18.1 --ppl-version=1.1
--isl-version=0.12  --try-64 /home/vwe/libs/gcc/test/android-ndk-r9c/src
/home/vwe/libs/gcc/test/android-ndk-r9c arm-linux-androideabi-4.8

[...]

In file included from ../.././gcc/tm.h:24:0,
 from
/home/vwe/libs/gcc/test/android-ndk-r9c/src/build/../gcc/gcc-4.8/libgcc/fixed-bit.c:48:
/home/vwe/libs/gcc/test/android-ndk-r9c/src/build/../gcc/gcc-4.8/libgcc/../gcc/config/gnu-user.h:109:0:
warning: "TARGET_POSIX_IO" redefined
 #define TARGET_POSIX_IO


[Bug c++/60222] [4.9 Regression] ICE with reference as template parameter

2014-02-21 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60222

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #4 from Jakub Jelinek  ---
Fixed.


[Bug c++/60167] [4.9 regression] Bogus error: conflicting declaration

2014-02-21 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60167

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #5 from Jakub Jelinek  ---
Fixed then.


[Bug c++/60250] [4.9 Regression] [c++1y] ICE using lambda for array size

2014-02-21 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60250

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #4 from Jakub Jelinek  ---
Fixed.


[Bug c++/60251] [4.9 Regression] [c++11] ICE capturing variable-length array

2014-02-21 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60251

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #5 from Jakub Jelinek  ---
Fixed.


[Bug middle-end/60292] [4.9 Regression] ICE: in fill_vec_av_set, at sel-sched.c:3863 with -m64 after r206174 on powerpc-apple-darwin9.8.0

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

--- Comment #3 from Dominique d'Humieres  ---
> Dominique, I don't have a darwin machine, can you help me with testing 
> this patch on darwin?  I will do the x86-64 and ia64.

I am currently bootstrapping with the patch. Results expected for tomorrow.
Then retesting will require ~36h, so probably monday.

Thanks for the quick answer.


[Bug ipa/60266] [4.9 Regression] ICE: in ipa_get_parm_lattices, at ipa-cp.c:261 during LibreOffice LTO build

2014-02-21 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60266

--- Comment #3 from Martin Jambor  ---
(In reply to Markus Trippelsdorf from comment #2)
> It's caused by mixing -O0 and -O2 with LTO:
> 

Indeed.  Patch fixing this ICE is pending approval at:

http://gcc.gnu.org/ml/gcc-patches/2014-02/msg01325.html


[Bug c++/60051] [4.9 Regression] [c++11] ICE with auto and array initialization

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60051

--- Comment #2 from Jason Merrill  ---
Author: jason
Date: Fri Feb 21 14:56:20 2014
New Revision: 207998

URL: http://gcc.gnu.org/viewcvs?rev=207998&root=gcc&view=rev
Log:
DR 1591
PR c++/60051
* pt.c (unify): Only unify if deducible.  Handle 0-length list.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/initlist80.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c


[Bug c++/60252] [4.7/4.8/4.9 Regression] [c++11] ICE with invalid variable-length array in lambda parameter

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60252

--- Comment #2 from Jason Merrill  ---
Author: jason
Date: Fri Feb 21 14:56:31 2014
New Revision: 207999

URL: http://gcc.gnu.org/viewcvs?rev=207999&root=gcc&view=rev
Log:
PR c++/60252
* lambda.c (maybe_resolve_dummy): Don't try to capture this
in declaration context.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice11.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/lambda.c


[Bug c++/60277] Bogus "inline function virtual ..." used but never defined

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60277

--- Comment #2 from Jason Merrill  ---
Author: jason
Date: Fri Feb 21 14:56:46 2014
New Revision: 208001

URL: http://gcc.gnu.org/viewcvs?rev=208001&root=gcc&view=rev
Log:
PR c++/60277
* call.c (build_array_conv): Don't crash on VLA.

Added:
trunk/gcc/testsuite/g++.dg/cpp1y/vla13.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c


[Bug c++/60248] [4.7/4.8/4.9 Regression] [C++11] ICE specializing variadic template

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60248

--- Comment #2 from Jason Merrill  ---
Author: jason
Date: Fri Feb 21 14:56:38 2014
New Revision: 208000

URL: http://gcc.gnu.org/viewcvs?rev=208000&root=gcc&view=rev
Log:
PR c++/60248
* mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/variadic149.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/mangle.c


[Bug c++/60224] [4.7/4.8/4.9 Regression] ICE using invalid initializer for array

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60224

--- Comment #2 from Jason Merrill  ---
Author: jason
Date: Fri Feb 21 14:56:53 2014
New Revision: 208002

URL: http://gcc.gnu.org/viewcvs?rev=208002&root=gcc&view=rev
Log:
PR c++/60224
* decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
Don't get confused by a CONSTRUCTOR that already has a type.

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


[Bug c++/60219] [4.8/4.9 Regression] [c++11] ICE invalid use of variadic template

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60219

--- Comment #2 from Jason Merrill  ---
Author: jason
Date: Fri Feb 21 14:57:00 2014
New Revision: 208003

URL: http://gcc.gnu.org/viewcvs?rev=208003&root=gcc&view=rev
Log:
PR c++/60219
* pt.c (coerce_template_parms): Bail if argument packing fails.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/variadic150.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c


[Bug c++/60216] [4.8/4.9 Regression] [c++11] Trouble with deleted template functions

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60216

--- Comment #3 from Jason Merrill  ---
Author: jason
Date: Fri Feb 21 14:57:07 2014
New Revision: 208004

URL: http://gcc.gnu.org/viewcvs?rev=208004&root=gcc&view=rev
Log:
PR c++/60216
* pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
(check_explicit_specialization): Don't clone.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/deleted3.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c


[Bug fortran/60302] New: ICE with c_f_pointer and android cross compiler

2014-02-21 Thread valeryweber at hotmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60302

Bug ID: 60302
   Summary: ICE with c_f_pointer and android cross compiler
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: valeryweber at hotmail dot com

Dear All

I get an ICE while cross (android, ndk-toolchains 4.9c) compiling (gcc-trunk)
the following code.
The problem seems to arises in c_f_pointer.

Please let me know if more info is needed.

Thanks

v



cat gcc_reshaper.f90 
module reshaper

  implicit none

contains

  subroutine reshape_inplace_c2_c2(tgt_x, new_shape, ptr_x)
use, intrinsic :: iso_c_binding
implicit none
complex(8), target, intent(in) :: tgt_x(1,*)
integer, intent(in) :: new_shape(:)
complex(8), pointer, intent(out) :: ptr_x(:,:)
type(c_ptr) :: loc_x
loc_x = c_loc(tgt_x)
call c_f_pointer(loc_x, ptr_x, new_shape)
  end subroutine reshape_inplace_c2_c2

end module reshaper

+


/home/vwe/libs/gcc/test/tmp2/prefix/bin/arm-linux-androideabi-gfortran -c
gcc_reshaper.f90 
*** glibc detected ***
/home/vwe/libs/gcc/test/tmp2/prefix/libexec/gcc/arm-linux-androideabi/4.9.0/f951:
double free or corruption (fasttop): 0x036c5b60 ***
=== Backtrace: =
/lib64/libc.so.6[0x308147cb3e]
/home/vwe/libs/gcc/test/tmp2/prefix/libexec/gcc/arm-linux-androideabi/4.9.0/f951(_Z21gfc_check_c_f_pointerP8gfc_exprS0_S0_+0x191)[0x577c61]
/home/vwe/libs/gcc/test/tmp2/prefix/libexec/gcc/arm-linux-androideabi/4.9.0/f951(_Z27gfc_intrinsic_sub_interfaceP8gfc_codei+0xee)[0x5b1dee]
/home/vwe/libs/gcc/test/tmp2/prefix/libexec/gcc/arm-linux-androideabi/4.9.0/f951[0x5eef29]
/home/vwe/libs/gcc/test/tmp2/prefix/libexec/gcc/arm-linux-androideabi/4.9.0/f951[0x5f3d7d]
/home/vwe/libs/gcc/test/tmp2/prefix/libexec/gcc/arm-linux-androideabi/4.9.0/f951[0x5f58df]
/home/vwe/libs/gcc/test/tmp2/prefix/libexec/gcc/arm-linux-androideabi/4.9.0/f951[0x5f57e8]
/home/vwe/libs/gcc/test/tmp2/prefix/libexec/gcc/arm-linux-androideabi/4.9.0/f951(_Z11gfc_resolveP13gfc_namespace+0x66)[0x5e66b6]
/home/vwe/libs/gcc/test/tmp2/prefix/libexec/gcc/arm-linux-androideabi/4.9.0/f951(_Z14gfc_parse_filev+0x29b)[0x5dbd9b]
/home/vwe/libs/gcc/test/tmp2/prefix/libexec/gcc/arm-linux-androideabi/4.9.0/f951[0x6199f6]
/home/vwe/libs/gcc/test/tmp2/prefix/libexec/gcc/arm-linux-androideabi/4.9.0/f951[0xa21cbc]
/home/vwe/libs/gcc/test/tmp2/prefix/libexec/gcc/arm-linux-androideabi/4.9.0/f951(_Z11toplev_mainiPPc+0xa18)[0xa23978]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x3081421a05]
/home/vwe/libs/gcc/test/tmp2/prefix/libexec/gcc/arm-linux-androideabi/4.9.0/f951[0x56aa99]
=== Memory map: 
0040-01638000 r-xp  fd:03 7609006   
/home/vwe/libs/gcc/test/tmp2/prefix/libexec/gcc/arm-linux-androideabi/4.9.0/f951
01838000-0183e000 r--p 01238000 fd:03 7609006   
/home/vwe/libs/gcc/test/tmp2/prefix/libexec/gcc/arm-linux-androideabi/4.9.0/f951
0183e000-0184c000 rw-p 0123e000 fd:03 7609006   
/home/vwe/libs/gcc/test/tmp2/prefix/libexec/gcc/arm-linux-androideabi/4.9.0/f951
0184c000-0192d000 rw-p  00:00 0 
03646000-036e6000 rw-p  00:00 0  [heap]
3080c0-3080c2 r-xp  fd:02 1458068   
/usr/lib64/ld-2.16.so
3080e2-3080e21000 r--p 0002 fd:02 1458068   
/usr/lib64/ld-2.16.so
3080e21000-3080e22000 rw-p 00021000 fd:02 1458068   
/usr/lib64/ld-2.16.so
3080e22000-3080e23000 rw-p  00:00 0 
308140-30815ad000 r-xp  fd:02 1458069   
/usr/lib64/libc-2.16.so
30815ad000-30817ad000 ---p 001ad000 fd:02 1458069   
/usr/lib64/libc-2.16.so
30817ad000-30817b1000 r--p 001ad000 fd:02 1458069   
/usr/lib64/libc-2.16.so
30817b1000-30817b3000 rw-p 001b1000 fd:02 1458069   
/usr/lib64/libc-2.16.so
30817b3000-30817b8000 rw-p  00:00 0 
3081c0-3081c03000 r-xp  fd:02 1458072   
/usr/lib64/libdl-2.16.so
3081c03000-3081e02000 ---p 3000 fd:02 1458072   
/usr/lib64/libdl-2.16.so
3081e02000-3081e03000 r--p 2000 fd:02 1458072   
/usr/lib64/libdl-2.16.so
3081e03000-3081e04000 rw-p 3000 fd:02 1458072   
/usr/lib64/libdl-2.16.so
308200-308210 r-xp  fd:02 1458079   
/usr/lib64/libm-2.16.so
308210-30822ff000 ---p 0010 fd:02 1458079   
/usr/lib64/libm-2.16.so
30822ff000-308230 r--p 000ff000 fd:02 1458079   
/usr/lib64/libm-2.16.so
308230-3082301000 rw-p 0010 fd:02 1458079   
/usr/lib64/libm-2.16.so
3082c0-3082c15000 r-xp  fd:02 1458080   
/usr/lib64/

[Bug c/59850] Support sparse-style pointer address spaces (type attributes)

2014-02-21 Thread tromey at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59850

--- Comment #20 from Tom Tromey  ---
(In reply to Josh Triplett from comment #19)

> I brought this exact case up on linux-sparse, and Christopher Li's (quite
> reasonable) perspective was that it doesn't really make sense to put "force"
> on a variable to begin with (as opposed to a function parameter).  Given
> that, I think one of two behaviors would be reasonable: either prohibit
> force entirely on non-parameter variable declarations, or allow it and treat
> it much like parameters (ignore extended type differences on assignment). 
> I'm mildly inclined towards the latter.
> 
> I don't, however, think it's sensible to reproduce sparse's behavior
> entirely here, allowing it but not having it take effect.  Either prohibit
> it or give it a sensible semantic, preferably the latter.

Allowing it is definitely simpler to implement.
Disallowing it for ordinary declarations would need some research
on my part.
BTW if you want to try it out I have a branch:
https://github.com/tromey/gcc/tree/add-sparse-attributes


[Bug other/60303] New: Spelling Error

2014-02-21 Thread alangiderick at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60303

Bug ID: 60303
   Summary: Spelling Error
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: other
  Assignee: unassigned at gcc dot gnu.org
  Reporter: alangiderick at gmail dot com

Created attachment 32189
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32189&action=edit
it is a spelling correction patch file

On reading the gcc/README.Portabibility file in the GCC software, i noticed
that a line had an error in the spelling and then i corrected it to make sure
that this will make the others downloading the updated copy of the software
will understand the grammer flowing in the text.


[Bug c++/60248] [4.7/4.8/4.9 Regression] [C++11] ICE specializing variadic template

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60248

--- Comment #3 from Jason Merrill  ---
Author: jason
Date: Fri Feb 21 15:01:54 2014
New Revision: 208005

URL: http://gcc.gnu.org/viewcvs?rev=208005&root=gcc&view=rev
Log:
PR c++/60248
* mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.

Added:
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/cpp0x/variadic149.C
Modified:
branches/gcc-4_7-branch/gcc/cp/ChangeLog
branches/gcc-4_7-branch/gcc/cp/mangle.c


[Bug fortran/60302] [4.9 Regression] ICE with c_f_pointer and android cross compiler

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

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-02-21
Summary|ICE with c_f_pointer and|[4.9 Regression] ICE with
   |android cross compiler  |c_f_pointer and android
   ||cross compiler
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
Confirmed on x86_64-apple-darwin13 r202590 and after. The test compiles with
4.8 and 4.7.


[Bug c++/60248] [4.7/4.8/4.9 Regression] [C++11] ICE specializing variadic template

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60248

--- Comment #4 from Jason Merrill  ---
Author: jason
Date: Fri Feb 21 15:29:14 2014
New Revision: 208006

URL: http://gcc.gnu.org/viewcvs?rev=208006&root=gcc&view=rev
Log:
PR c++/60248
* mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.

Added:
branches/gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/variadic149.C
Modified:
branches/gcc-4_8-branch/gcc/cp/ChangeLog
branches/gcc-4_8-branch/gcc/cp/mangle.c


[Bug c++/60219] [4.8/4.9 Regression] [c++11] ICE invalid use of variadic template

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60219

--- Comment #3 from Jason Merrill  ---
Author: jason
Date: Fri Feb 21 15:29:25 2014
New Revision: 208007

URL: http://gcc.gnu.org/viewcvs?rev=208007&root=gcc&view=rev
Log:
PR c++/60219
* pt.c (coerce_template_parms): Bail if argument packing fails.

Added:
branches/gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/variadic150.C
Modified:
branches/gcc-4_8-branch/gcc/cp/ChangeLog
branches/gcc-4_8-branch/gcc/cp/pt.c


[Bug c++/60216] [4.8/4.9 Regression] [c++11] Trouble with deleted template functions

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60216

--- Comment #4 from Jason Merrill  ---
Author: jason
Date: Fri Feb 21 15:29:32 2014
New Revision: 208008

URL: http://gcc.gnu.org/viewcvs?rev=208008&root=gcc&view=rev
Log:
PR c++/60216
* pt.c (register_specialization): Copy DECL_DELETED_FN to clones.

Added:
branches/gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/deleted3.C
Modified:
branches/gcc-4_8-branch/gcc/cp/ChangeLog
branches/gcc-4_8-branch/gcc/cp/pt.c


[Bug c++/60051] [4.9 Regression] [c++11] ICE with auto and array initialization

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60051

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #3 from Jason Merrill  ---
Fixed.


[Bug c++/60216] [4.8/4.9 Regression] [c++11] Trouble with deleted template functions

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60216

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #5 from Jason Merrill  ---
Fixed for 4.8.3/4.9.


[Bug other/60303] Spelling Error

2014-02-21 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60303

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||documentation, patch
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-02-21
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
thanks!


[Bug c++/60252] [4.7/4.8/4.9 Regression] [c++11] ICE with invalid variable-length array in lambda parameter

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60252

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #3 from Jason Merrill  ---
Fixed in 4.9.


[Bug c++/60248] [4.7/4.8/4.9 Regression] [C++11] ICE specializing variadic template

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60248

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #5 from Jason Merrill  ---
Fixed for 4.7.4/4.8.3/4.9.


[Bug c++/60299] [C++11] Copy constructor calls itself if base class has a constructor which is a variadic function template

2014-02-21 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60299

Jonathan Wakely  changed:

   What|Removed |Added

   Severity|major   |normal


[Bug c++/60227] [4.7/4.8/4.9 Regression] [C++11] ICE using brace-enclosed initializer list to initialize array

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60227

--- Comment #2 from Jason Merrill  ---
Author: jason
Date: Fri Feb 21 15:53:43 2014
New Revision: 208009

URL: http://gcc.gnu.org/viewcvs?rev=208009&root=gcc&view=rev
Log:
PR c++/60227
Fix ChangeLog

Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/testsuite/g++.dg/cpp1y/vla13.C


[Bug c++/60299] [C++11] Copy constructor calls itself if base class has a constructor which is a variadic function template

2014-02-21 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60299

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #6 from Jonathan Wakely  ---
Yes, the program is broken and G++ does exactly what it's supposed to.

You probably want:

  template
  B(Args&&... params)
  {

  }


[Bug c++/60227] [4.7/4.8/4.9 Regression] [C++11] ICE using brace-enclosed initializer list to initialize array

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60227

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #3 from Jason Merrill  ---
Fixed for 4.9.


[Bug c++/60224] [4.7/4.8/4.9 Regression] ICE using invalid initializer for array

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60224

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #3 from Jason Merrill  ---
Fixed for 4.9.


[Bug c++/60219] [4.8/4.9 Regression] [c++11] ICE invalid use of variadic template

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60219

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #4 from Jason Merrill  ---
Fixed for 4.8.3/4.9.


[Bug preprocessor/60304] New: Including disables -Wconversion-null

2014-02-21 Thread bug-reports at psdtechnologies dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60304

Bug ID: 60304
   Summary: Including  disables -Wconversion-null
   Product: gcc
   Version: 4.8.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: preprocessor
  Assignee: unassigned at gcc dot gnu.org
  Reporter: bug-reports at psdtechnologies dot com

Created attachment 32190
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32190&action=edit
Minimal example of bug (does not emit warning)

Compiling any code with '#include ' disables the conversion-null
warning, but only when compiling directly from source; preprocessing separately
does not reproduce the bug.

I've attached minimal examples, reproduced here since they're so short (1-2
lines)


This file behaves as expected (warning.cpp):
"""
int * foo() {return false;}
"""

$ g++-4.8 -std=c++11 -c warning.cpp 
warning.cpp: In function ‘int* foo()’:
warning.cpp:1:21: warning: converting ‘false’ to pointer type ‘int*’
[-Wconversion-null]
 int * foo() {return false;}
 ^

This warning is expected since -Wconversion-null is enabled by default. It also
can be made to error as expected using -Wall or by inserting 

"""
#pragma GCC diagnostic error "-Wconversion-null" 
"""

in the source prior to the function.



This file (differing only by the inclusion of  does not issue the
warning, and cannot be made to error or warn even with the pragma:

"""
#include 
int * foo() {return false;}
"""

g++-4.8 -std=c++11 -c nowarning.cpp # success

Compiling incrementally, though, restores the expected behavior:

g++-4.8 -std=c++11 -E nowarning.cpp -o nowarning.i # success
g++-4.8 -std=c++11 -c nowarning.i
nowarning.cpp: In function ‘int* foo()’:
nowarning.cpp:2:21: warning: converting ‘false’ to pointer type ‘int*’
[-Wconversion-null]
 int * foo() {return false;}
 ^

As does using -save-temps:

g++-4.8 -std=c++11 -save-temps -c nowarning.cpp
nowarning.cpp: In function ‘int* foo()’:
nowarning.cpp:2:21: warning: converting ‘false’ to pointer type ‘int*’
[-Wconversion-null]
 int * foo() {return false;}
 ^




Version information:
g++-4.8 -std=c++11 -v -c nowarning.cpp
Using built-in specs.
COLLECT_GCC=g++-4.8
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.8.1-2ubuntu1~12.04' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.8 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin
--with-system-zlib --disable-browser-plugin --enable-java-awt=gtk
--enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre
--enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64 --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.8.1 (Ubuntu 4.8.1-2ubuntu1~12.04) 
COLLECT_GCC_OPTIONS='-std=c++11' '-v' '-c' '-shared-libgcc' '-mtune=generic'
'-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/4.8/cc1plus -quiet -v -imultilib . -imultiarch
x86_64-linux-gnu -D_GNU_SOURCE nowarning.cpp -quiet -dumpbase nowarning.cpp
-mtune=generic -march=x86-64 -auxbase nowarning -std=c++11 -version
-fstack-protector -o /tmp/ccCyoaqJ.s
GNU C++ (Ubuntu 4.8.1-2ubuntu1~12.04) version 4.8.1 (x86_64-linux-gnu)
compiled by GNU C version 4.8.1, GMP version 5.0.2, MPFR version 3.1.0-p3,
MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/4.8"
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/4.8
 /usr/include/x86_64-linux-gnu/c++/4.8/.
 /usr/include/c++/4.8/backward
 /usr/lib/gcc/x86_64-linux-gnu/4.8/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
GNU C++ (Ubuntu 4.8.1-2ubuntu1~12.04) version 4.8.1 (x86_64-linux-gnu)
compiled by GNU C version 4.8.1, GMP version 5.0.2, MPFR version 3.1.0-p3,
MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 227d7ccf00

[Bug preprocessor/60304] Including disables -Wconversion-null

2014-02-21 Thread bug-reports at psdtechnologies dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60304

--- Comment #1 from bug-reports at psdtechnologies dot com ---
Created attachment 32191
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32191&action=edit
Similar code behaving as expected


[Bug target/60300] [avr] Suboptimal stack pointer manipulation for frame setup

2014-02-21 Thread matthijs at stdin dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60300

--- Comment #1 from Matthijs Kooijman  ---
I noticed I didn't use -O in the output I pasted, but I just confirmed that the
results are the same with -Os and -O3.


[Bug preprocessor/60304] Including disables -Wconversion-null

2014-02-21 Thread harald at gigawatt dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60304

Harald van Dijk  changed:

   What|Removed |Added

 CC||harald at gigawatt dot nl

--- Comment #2 from Harald van Dijk  ---
The warning is suppressed because it is supposedly from a system header (even
though clearly, that is not the case) and including -Wsystem-headers on the
command-line shows:

$ gcc-run/bin/g++ -std=c++11 -c test.cc -Wsystem-headers
In file included from
/home/harald/gcc-run/include/c++/4.9.0/bits/atomic_base.h:36:0,
 from /home/harald/gcc-run/include/c++/4.9.0/atomic:41,
 from test.cc:2:
test.cc: In function ‘int* foo()’:
test.cc:3:21: warning: converting ‘false’ to pointer type ‘int*’
[-Wconversion-null]
 int * foo() {return false;}
 ^

[Bug c++/60241] [4.7/4.8/4.9 Regression] internal compiler error: in finish_member_declaration, at cp/semantics.c:2617

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60241

Jason Merrill  changed:

   What|Removed |Added

   Keywords|accepts-invalid,|ice-on-valid-code
   |ice-on-invalid-code |

--- Comment #3 from Jason Merrill  ---
And it's valid code.


[Bug c++/60241] [4.7/4.8/4.9 Regression] internal compiler error: in finish_member_declaration, at cp/semantics.c:2617

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60241

Jason Merrill  changed:

   What|Removed |Added

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


[Bug c++/60200] [4.9 Regression] [c++11] ICE with invalid use of auto in typedef

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60200

Jason Merrill  changed:

   What|Removed |Added

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


[Bug c++/60187] [4.7/4.8/4.9 Regression] [c++11] ICE with parameter pack as underlying type for enum

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60187

Jason Merrill  changed:

   What|Removed |Added

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


[Bug c++/60186] [4.9 Regression] [c++11] ICE with invalid value in constexpr array initializer

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60186

Jason Merrill  changed:

   What|Removed |Added

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


[Bug target/58595] internal compiler error: in gen_movsi when compiling on arm some files of lttng-tools with -fPIE

2014-02-21 Thread meadori at codesourcery dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58595

Meador Inge  changed:

   What|Removed |Added

 CC||meadori at codesourcery dot com

--- Comment #2 from Meador Inge  ---
I hit this problem as well.  Here is a much reduced test case:

$ cat repro.c   
struct state {  
 unsigned long last;
 unsigned long current; 
};  

__thread struct state state;

void foo()  
{   
  while (1) {   
__sync_add_and_fetch_4(&state.current, (long) 1);   
  } 
}   
$ ./install/bin/arm-none-linux-gnueabi-gcc --version
arm-none-linux-gnueabi-gcc (GCC) 4.9.0 20140219 (experimental)  
Copyright (C) 2014 Free Software Foundation, Inc.   
This is free software; see the source for copying conditions.  There is NO  
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 

meadori@build1-lucid-cs:/scratch/meadori/arm-none-linux-gnueabi-fsf-mainline$
./install/bin/arm-none-linux-gnueabi-gcc -fPIC -O2 repro.c  
repro.c: In function 'foo': 
repro.c:13:1: internal compiler error: in gen_movsi, at config/arm/arm.md:6272  
 }  
 ^  
0x8b3ee69 gen_movsi(rtx_def*, rtx_def*) 
   
/scratch/meadori/arm-none-linux-gnueabi-fsf-mainline/src/gcc-mainline/gcc/config/arm/arm.md:6272
 
0x838853f insn_gen_fn::operator()(rtx_def*, rtx_def*) const 
   
/scratch/meadori/arm-none-linux-gnueabi-fsf-mainline/src/gcc-mainline/gcc/recog.h:284
 
0x844b2be emit_move_insn_1(rtx_def*, rtx_def*)  
   
/scratch/meadori/arm-none-linux-gnueabi-fsf-mainline/src/gcc-mainline/gcc/expr.c:3556
 
0x844b6f1 emit_move_insn(rtx_def*, rtx_def*)
   
/scratch/meadori/arm-none-linux-gnueabi-fsf-mainline/src/gcc-mainline/gcc/expr.c:3650
 
0x8508d4a process_insert_insn   
   
/scratch/meadori/arm-none-linux-gnueabi-fsf-mainline/src/gcc-mainline/gcc/gcse.c:2133
 
0x85091f4 pre_edge_insert   
   
/scratch/meadori/arm-none-linux-gnueabi-fsf-mainline/src/gcc-mainline/gcc/gcse.c:2310
 
0x8509c2a pre_gcse  
   
/scratch/meadori/arm-none-linux-gnueabi-fsf-mainline/src/gcc-mainline/gcc/gcse.c:2641
 
0x8509d8a one_pre_gcse_pass 
   
/scratch/meadori/arm-none-linux-gnueabi-fsf-mainline/src/gcc-mainline/gcc/gcse.c:2696
 
0x850caa4 execute_rtl_pre   
   
/scratch/meadori/arm-none-linux-gnueabi-fsf-mainline/src/gcc-mainline/gcc/gcse.c:4127
 
0x850cba8 execute   
   
/scratch/meadori/arm-none-linux-gnueabi-fsf-mainline/src/gcc-mainline/gcc/gcse.c:4186
 
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.  
See  for instructions.


[Bug target/58595] internal compiler error: in gen_movsi when compiling on arm some files of lttng-tools with -fPIE

2014-02-21 Thread meadori at codesourcery dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58595

--- Comment #3 from Meador Inge  ---
As shown in the backtrace, the ICE occurs when GCSE tries generate a move.
The the following asserts fire in 'gen_movsi':

  gcc_assert (GET_CODE (tmp) == SYMBOL_REF);
  gcc_assert (SYMBOL_REF_TLS_MODEL (tmp) != 0);

This is because the move operands look like:

  (gdb) p debug_rtx(operands[0])
  (reg/f:SI 115)

  (gdb) p debug_rtx(operands[1])
  (mem/u/c:SI (plus:SI (reg:SI 111)
  (unspec:SI [
  (symbol_ref:SI ("state") [flags 0x90] )
  ] UNSPEC_PIC_SYM)) [0  S4 A32])

We aren't expecting the 'mem' expression with the TLS reference in side.

I am not sure if this is just an overzealous assert or we have a deeper
issue.  Removing the asserts does allow the code to compile.


[Bug fortran/60302] [4.9 Regression] ICE with c_f_pointer and android cross compiler

2014-02-21 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60302

janus at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
 CC||janus at gcc dot gnu.org

--- Comment #2 from janus at gcc dot gnu.org ---
Slightly reduced test case:

  subroutine reshape_inplace_c2_c2 (new_shape)
use, intrinsic :: iso_c_binding
implicit none
integer :: new_shape(:)
complex, pointer :: ptr_x(:)
type(c_ptr) :: loc_x
call c_f_pointer (loc_x, ptr_x, new_shape)
  end subroutine

Same double-free ICE.


[Bug fortran/60302] [4.9 Regression] ICE with c_f_pointer and android cross compiler

2014-02-21 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60302

--- Comment #3 from janus at gcc dot gnu.org ---
(In reply to Valery Weber from comment #0)
> f951: internal compiler error: Aborted
> 0xa217af crash_signal
>   
> /home/vwe/libs/gcc/test/android-ndk-r9c/src/build/../gcc/gcc-4.8/gcc/toplev.
> c:337
> 0x577c60 gfc_check_c_f_pointer(gfc_expr*, gfc_expr*, gfc_expr*)
>   /home/vwe/libs/gcc/test/android-ndk-r9c/src/build/../gcc/gcc-4.8/gcc/
> fortran/check.c:3956

The function 'gfc_check_c_f_pointer' was added in r197053 and slightly modified
in r197682.

Then there is another minor change later at 200794, which seems to be unrelated
to this PR, though.

[Bug fortran/60302] [4.9 Regression] ICE with c_f_pointer and android cross compiler

2014-02-21 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60302

janus at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||burnus at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |janus at gcc dot gnu.org

--- Comment #4 from janus at gcc dot gnu.org ---
(In reply to janus from comment #3)
> The function 'gfc_check_c_f_pointer' was added in r197053

... and I think that's indeed the culprit. This patch fixes it:


Index: gcc/fortran/check.c
===
--- gcc/fortran/check.c(revision 207988)
+++ gcc/fortran/check.c(working copy)
@@ -3944,16 +3944,17 @@ gfc_check_c_f_pointer (gfc_expr *cptr, gfc_expr *f
   if (shape)
 {
   mpz_t size;
-
-  if (gfc_array_size (shape, &size)
-  && mpz_cmp_ui (size, fptr->rank) != 0)
+  if (gfc_array_size (shape, &size))
 {
+  if (mpz_cmp_ui (size, fptr->rank) != 0)
+{
+  mpz_clear (size);
+  gfc_error ("SHAPE argument at %L to C_F_POINTER must have the same "
+"size as the RANK of FPTR", &shape->where);
+  return false;
+}
   mpz_clear (size);
-  gfc_error ("SHAPE argument at %L to C_F_POINTER must have the same "
- "size as the RANK of FPTR", &shape->where);
-  return false;
 }
-  mpz_clear (size);
 }

   if (fptr->ts.type == BT_CLASS)



We should not free 'size' unless gfc_array_size is successful!


[Bug c++/60185] [4.9 Regression] ICE with invalid default parameter

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60185

Jason Merrill  changed:

   What|Removed |Added

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


[Bug c++/60305] New: ICE constexpr array of functions in template

2014-02-21 Thread trashyankes at wp dot pl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60305

Bug ID: 60305
   Summary: ICE constexpr array of functions in template
   Product: gcc
   Version: 4.8.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: trashyankes at wp dot pl

-->8>8>8>8>8--

template
int F() { return Y; }

template
void func(int i)
{
//internal compiler error: in type_dependent_expression_p, at cp/pt.c:19969
constexpr int (*Func[])() = { F... }; 
return Func[i]();
}

-->8>8>8>8>8--

without constexpr its compile without error.


[Bug fortran/60302] [4.9 Regression] ICE with c_f_pointer and android cross compiler

2014-02-21 Thread pault at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60302

Paul Thomas  changed:

   What|Removed |Added

 CC||pault at gcc dot gnu.org

--- Comment #5 from Paul Thomas  ---
(In reply to janus from comment #4)
> (In reply to janus from comment #3)
> > The function 'gfc_check_c_f_pointer' was added in r197053
> 
> ... and I think that's indeed the culprit. This patch fixes it:
> 
> 
> Index: gcc/fortran/check.c
> ===
> --- gcc/fortran/check.c   (revision 207988)
> +++ gcc/fortran/check.c   (working copy)
> @@ -3944,16 +3944,17 @@ gfc_check_c_f_pointer (gfc_expr *cptr, gfc_expr *f
>if (shape)
>  {
>mpz_t size;
> -
> -  if (gfc_array_size (shape, &size)
> -   && mpz_cmp_ui (size, fptr->rank) != 0)
> +  if (gfc_array_size (shape, &size))
>   {
> +   if (mpz_cmp_ui (size, fptr->rank) != 0)
> + {
> +   mpz_clear (size);
> +   gfc_error ("SHAPE argument at %L to C_F_POINTER must have the 
> same "
> + "size as the RANK of FPTR", &shape->where);
> +   return false;
> + }
> mpz_clear (size);
> -   gfc_error ("SHAPE argument at %L to C_F_POINTER must have the same "
> -  "size as the RANK of FPTR", &shape->where);
> -   return false;
>   }
> -  mpz_clear (size);
>  }
>  
>if (fptr->ts.type == BT_CLASS)
> 
> 
> 
> We should not free 'size' unless gfc_array_size is successful!

Hi Janus,

Perhaps you had better commit this asap.

Cheers

Paul

[Bug c++/60108] [4.7/4.8/4.9 Regression] [C++11] ICE in use_thunk, at cp/method.c:340

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60108

Jason Merrill  changed:

   What|Removed |Added

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


[Bug c++/59347] [4.9 Regression] ICE on invalid: tree check: expected class 'type', have 'exceptional' (error_mark) in tsubst_decl, at cp/pt.c:10798

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59347

--- Comment #4 from Jason Merrill  ---
*** Bug 60200 has been marked as a duplicate of this bug. ***


[Bug c++/60200] [4.9 Regression] [c++11] ICE with invalid use of auto in typedef

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60200

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #2 from Jason Merrill  ---
Dup

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


[Bug c++/59347] [4.9 Regression] ICE on invalid: tree check: expected class 'type', have 'exceptional' (error_mark) in tsubst_decl, at cp/pt.c:10798

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59347

Jason Merrill  changed:

   What|Removed |Added

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


[Bug c++/58170] [4.7/4.8/4.9 Regression] [c++11] Crash when aliasing a template class that is a member of its template base class.

2014-02-21 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58170

Jason Merrill  changed:

   What|Removed |Added

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


[Bug c++/58606] [4.8 Regression] [c++11] ICE with specialization in variadic template

2014-02-21 Thread reichelt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58606

Volker Reichelt  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
  Known to work||4.9.0
 Resolution|FIXED   |---
Summary|[4.8/4.9 Regression]|[4.8 Regression] [c++11]
   |[c++11] ICE with|ICE with specialization in
   |specialization in variadic  |variadic template
   |template|
  Known to fail|4.9.0   |

--- Comment #7 from Volker Reichelt  ---
Since the patch was reverted on the 4.8 branch, the bug is again open there.


[Bug c++/60167] [4.9 regression] Bogus error: conflicting declaration

2014-02-21 Thread reichelt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60167
Bug 60167 depends on bug 58606, which changed state.

Bug 58606 Summary: [4.8 Regression] [c++11] ICE with specialization in variadic 
template
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58606

   What|Removed |Added

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


[Bug c++/60052] [c++1y] ICE with auto as member function parameter

2014-02-21 Thread reichelt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60052

Volker Reichelt  changed:

   What|Removed |Added

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

--- Comment #2 from Volker Reichelt  ---
Fixed by Adam's patch.


[Bug c++/60053] [c++1y] ICE with auto as member template function parameter

2014-02-21 Thread reichelt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60053

Volker Reichelt  changed:

   What|Removed |Added

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

--- Comment #2 from Volker Reichelt  ---
Fixed by Adam's patch.


  1   2   >