[Bug fortran/40054] [F08] Pointer functions as lvalue

2013-10-25 Thread quantheory at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40054

Sean Santos  changed:

   What|Removed |Added

 CC||quantheory at gmail dot com

--- Comment #12 from Sean Santos  ---
I think Tobias already has this figured, but my view of this was as follows.

These define statement functions yielding 7:

--- Example 1 ---

two() = 7
end

--- Example 2 ---

module foo
contains
  function two()
integer, pointer  :: two
allocate(two)
  end function two

  subroutine bar()
! Fortran 2008 (12.6.4) says that this is necessary to hide
! the host-associated declaration
integer :: two
two() = 7
  end subroutine bar
end module foo

These refer to the pointer function:

--- Example 1 ---

two() = 7
contains
  function two ()
integer, pointer  :: two
allocate(two)
  end function two
end

--- Example 2 ---

module foo
contains
  function two ()
integer, pointer  :: two
allocate(two)
  end function two
end module

program
use foo
two() = 7
end program

--- Example 3 ---

module foo
contains
  function two()
integer, pointer  :: two
allocate(two)
  end function two

  subroutine bar()
two() = 7
  end subroutine bar
end module foo

And these are not allowed at all based on 11.2.2.8 and 16.3.1.3, because they
result in a name clash:

--- Example 1 ---

integer :: two
two() = 7
contains
  function two ()
integer, pointer  :: two
allocate(two)
  end function two
end

--- Example 2 ---

module foo
contains
  function two ()
integer, pointer  :: two
allocate(two)
  end function two
end module

program
use foo
integer :: two
two() = 7
end program


[Bug c++/58868] [4.9 Regression] ICE: in count_type_elements, at expr.c:5495 with -std=gnu++0x

2013-10-25 Thread mpolacek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58868

--- Comment #3 from Marek Polacek  ---
We somehow create 
type 
constant lngt 1
and count_type_elements can't handle LANG_TYPE.


[Bug ada/58870] New: ICE on invalid: Assert_Failure sinfo.adb:1933

2013-10-25 Thread baldrick at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58870

Bug ID: 58870
   Summary: ICE on invalid: Assert_Failure sinfo.adb:1933
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
  Assignee: unassigned at gcc dot gnu.org
  Reporter: baldrick at gcc dot gnu.org

To see this the compiler has to be built with checking enabled.

$ gcc -c m.adb
+===GNAT BUG DETECTED==+
| 4.9.0 20131014 (experimental) (x86_64-unknown-linux-gnu) Assert_Failure
sinfo.adb:1933|
| Error detected at n.adb:4:14 [m.adb:3:3] |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.|
| Use a subject line meaningful to you and us to track the bug.|
| Include the entire contents of this bug box in the report.   |
| Include the exact gcc or gnatmake command that you entered.  |
| Also include sources listed below in gnatchop format |
| (concatenated together with no headers between files).   |
+==+

Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.
Consider also -gnatd.n switch (see debug.adb).

m.adb
n.ads
n.adb


raised SYSTEM.ASSERTIONS.ASSERT_FAILURE : namet.adb:655

-- chop here --

with N;
procedure M is
  package NI is new N (1, -- missing term
  );
begin null; end;
package body N is
  function F return Integer is
  begin
  return B;
  end;
end;
generic
   A : Integer;
   B : Integer := 0;
package N is
   function F return Integer;
end;


[Bug c++/58871] New: [4.7/4.8/4.9 Regression] [c++11] ICE with defaulted copy constructor in broken template class hierarchy

2013-10-25 Thread reichelt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58871

Bug ID: 58871
   Summary: [4.7/4.8/4.9 Regression] [c++11] ICE with defaulted
copy constructor in broken template class hierarchy
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: reichelt at gcc dot gnu.org

The following invalid code snippet (compiled with "-std=c++11" or "-std=c++0x"
for older compilers) triggers an ICE since GCC 4.6.0:


template struct A : virtual T
{
  A();
  A(const A&);
};

template A::A(const A&) = default;

A a = A();


bug.cc: In instantiation of 'struct A':
bug.cc:9:8:   required from here
bug.cc:1:29: error: base type 'int' fails to be a struct or class type
 template struct A : virtual T
 ^
bug.cc:7:22: internal compiler error: in implicitly_declare_fn, at
cp/method.c:1660
 template A::A(const A&) = default;
  ^
0x6b0bd0 implicitly_declare_fn(special_function_kind, tree_node*, bool,
tree_node*, tree_node*)
../../gcc/gcc/cp/method.c:1660
0x6b470e defaulted_late_check(tree_node*)
../../gcc/gcc/cp/method.c:1780
0x5cc4f4 tsubst_decl
../../gcc/gcc/cp/pt.c:10537
0x5b9634 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:11323
0x5e75db instantiate_class_template_1
../../gcc/gcc/cp/pt.c:8927
0x5e75db instantiate_class_template(tree_node*)
../../gcc/gcc/cp/pt.c:9236
0x6784eb complete_type(tree_node*)
../../gcc/gcc/cp/typeck.c:132
0x561589 start_decl_1(tree_node*, bool)
../../gcc/gcc/cp/decl.c:4679
0x58b2f1 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,
tree_node*, tree_node*, tree_node**)
../../gcc/gcc/cp/decl.c:4642
0x663dba cp_parser_init_declarator
../../gcc/gcc/cp/parser.c:16526
0x66569f cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:11066
0x6495e0 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:10947
0x6708fe cp_parser_declaration
../../gcc/gcc/cp/parser.c:10844
0x66f61a cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:10730
0x670f36 cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:3990
0x670f36 c_parse_file()
../../gcc/gcc/cp/parser.c:30999
0x78e183 c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1046
Please submit a full bug report, [etc.]


[Bug testsuite/58851] FAIL: gfortran.dg/unlimited_polymorphic_13.f90 -O0 execution test

2013-10-25 Thread paul.richard.thomas at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58851

--- Comment #5 from paul.richard.thomas at gmail dot com  ---
Dear Tobias,

I cannot get to the commit until Sunday night at earliest.  Thus, if
you can do it, that would be great. In fact, if you do that, I'll post
the fix for the hollerith nonsense on Sunday.

Cheers

Paul

On 23 October 2013 22:57, burnus at gcc dot gnu.org
 wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58851
>
> --- Comment #4 from Tobias Burnus  ---
> (In reply to paul.richard.tho...@gmail.com from comment #3)
>> I had changed the testcase to:
>
> ... which is in the essential part the same. (I had a few more checks, but
> those do not really matter.)
>
>> Is it not the case that the select type (o) is unnecessary for the test?
>> That is ' if (storage_size(o) /= sz) call abort()' is all that is needed?
>
> For this bug, yes. But I think checking that within SELECT TYPE the correct
> SIZE_OF is applied, doesn't harm. Thus, I think it is useful to have.
>
> I leave committing the patch to you – I think either of our versions is fine.
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
> You are the assignee for the bug.

[Bug c++/58871] [4.7/4.8/4.9 Regression] [c++11] ICE with defaulted copy constructor in broken template class hierarchy

2013-10-25 Thread mpolacek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58871

Marek Polacek  changed:

   What|Removed |Added

   Priority|P3  |P5
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2013-10-25
 CC||mpolacek at gcc dot gnu.org
   Target Milestone|--- |4.7.4
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek  ---
Confirmed.


[Bug rtl-optimization/58831] [4.8/4.9 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode

2013-10-25 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58831

--- Comment #7 from Eric Botcazou  ---
Author: ebotcazou
Date: Fri Oct 25 09:21:11 2013
New Revision: 204055

URL: http://gcc.gnu.org/viewcvs?rev=204055&root=gcc&view=rev
Log:
PR rtl-optimization/58831
* alias.c (init_alias_analysis): At the beginning of each iteration, set
the reg_seen[N] bit if static_reg_base_value[N] is non-null.

Added:
trunk/gcc/testsuite/gcc.c-torture/execute/pr58831.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/alias.c
trunk/gcc/testsuite/ChangeLog


[Bug fortran/58858] gfortran.dg/assumed_type_8.f90 fails

2013-10-25 Thread pault at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58858

Paul Thomas  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2013-10-25
   Assignee|unassigned at gcc dot gnu.org  |pault at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Paul Thomas  ---
Better still, I'll take it on!  It will be Sunday before I look at it.

Cheers

Paul


[Bug rtl-optimization/58831] [4.8/4.9 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode

2013-10-25 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58831

--- Comment #8 from Eric Botcazou  ---
Author: ebotcazou
Date: Fri Oct 25 09:24:02 2013
New Revision: 204056

URL: http://gcc.gnu.org/viewcvs?rev=204056&root=gcc&view=rev
Log:
PR rtl-optimization/58831
* alias.c (init_alias_analysis): At the beginning of each iteration, set
the reg_seen[N] bit if static_reg_base_value[N] is non-null.

Added:
branches/gcc-4_8-branch/gcc/testsuite/gcc.c-torture/execute/pr58831.c
  - copied unchanged from r204055,
trunk/gcc/testsuite/gcc.c-torture/execute/pr58831.c
Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/alias.c
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog


[Bug c/58872] New: RFC: more builtins for bit manipulation

2013-10-25 Thread yann at droneaud dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58872

Bug ID: 58872
   Summary: RFC: more builtins for bit manipulation
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: yann at droneaud dot fr

Current bit manipulation builtins can be found in documentation:
http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#Other-Builtins

GCC could benefit of more bit manipulation builtins, for example:

- rotate bit right:

  __builtin_ror8(uint8_t v, int count)
  __builtin_ror16(uint16_t v, int count)
  __builtin_ror32(uint32_t v, int count)
  __builtin_ror64(uint64_t v, int count)

- rotate bit left:

  __builtin_rol8(uint8_t v, int count)
  __builtin_rol16(uint16_t v, int count)
  __builtin_rol32(uint32_t v, int count)
  __builtin_rol64(uint64_t v, int count)

- reverse bit string (bit swap):

  __builtin_brev8(uint8_t v, int index, int count)
  __builtin_brev16(uint16_t v, int index, int count)
  __builtin_brev32(uint32_t v, int index, int count)
  __builtin_brev64(uint64_t v, int index, int count)


[Bug rtl-optimization/58831] [4.8/4.9 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode

2013-10-25 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58831

Eric Botcazou  changed:

   What|Removed |Added

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

--- Comment #9 from Eric Botcazou  ---
Thanks for reporting the problem.


[Bug c++/58873] New: [c++11] ICE with __underlying_type for broken enum

2013-10-25 Thread reichelt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58873

Bug ID: 58873
   Summary: [c++11] ICE with __underlying_type for broken enum
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: reichelt at gcc dot gnu.org

The following invalid code snippet (compiled with "-std=c++11") triggers an ICE
since GCC 4.7.0 (when __underlying_type was introduced):

===
enum A : enum { };

template struct B {};

B<__underlying_type(A)> b;
===

bug.cc:1:17: error: underlying type '' of 'A' must be an
integral type
 enum A : enum { };
 ^
bug.cc:5:22: internal compiler error: Segmentation fault
 B<__underlying_type(A)> b;
  ^
0xb1988f crash_signal
../../gcc/gcc/toplev.c:335
0x654b3a cp_parser_functional_cast
../../gcc/gcc/cp/parser.c:22866
0x64ef5d cp_parser_postfix_expression
../../gcc/gcc/cp/parser.c:5792
0x65171d cp_parser_unary_expression
../../gcc/gcc/cp/parser.c:7066
0x6522ef cp_parser_binary_expression
../../gcc/gcc/cp/parser.c:7758
0x6527cf cp_parser_assignment_expression
../../gcc/gcc/cp/parser.c:7996
0x652c24 cp_parser_assignment_expression
../../gcc/gcc/cp/parser.c:8046
0x652c24 cp_parser_constant_expression
../../gcc/gcc/cp/parser.c:8256
0x65cc73 cp_parser_template_argument
../../gcc/gcc/cp/parser.c:13859
0x65cc73 cp_parser_template_argument_list
../../gcc/gcc/cp/parser.c:13582
0x65cc73 cp_parser_enclosed_template_argument_list
../../gcc/gcc/cp/parser.c:22998
0x65dc2a cp_parser_template_id
../../gcc/gcc/cp/parser.c:13280
0x65e252 cp_parser_class_name
../../gcc/gcc/cp/parser.c:18853
0x65026f cp_parser_qualifying_entity
../../gcc/gcc/cp/parser.c:5499
0x65026f cp_parser_nested_name_specifier_opt
../../gcc/gcc/cp/parser.c:5224
0x65eac7 cp_parser_constructor_declarator_p
../../gcc/gcc/cp/parser.c:22204
0x65eac7 cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:11393
0x6654f9 cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:10998
0x6495e0 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:10947
0x6708fe cp_parser_declaration
../../gcc/gcc/cp/parser.c:10844
Please submit a full bug report, [etc.]


[Bug c++/58873] [4.7/4.8/4.9 Regression] [c++11] ICE with __underlying_type for broken enum

2013-10-25 Thread mpolacek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58873

Marek Polacek  changed:

   What|Removed |Added

   Priority|P3  |P5
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2013-10-25
 CC||mpolacek at gcc dot gnu.org
   Target Milestone|--- |4.7.4
Summary|[c++11] ICE with|[4.7/4.8/4.9 Regression]
   |__underlying_type for   |[c++11] ICE with
   |broken enum |__underlying_type for
   ||broken enum
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek  ---
Confirmed.


[Bug c++/58874] New: [4.9 Regression] [c++11] ICE with OpenMP reduction declaration and -std=c++11

2013-10-25 Thread reichelt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58874

Bug ID: 58874
   Summary: [4.9 Regression] [c++11] ICE with OpenMP reduction
declaration and -std=c++11
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: reichelt at gcc dot gnu.org

The following valid code snippet triggers an ICE on trunk if compiled with
"-fopenmp -std=c++11"):

==
struct A
{
  template struct B
  {
#pragma omp declare reduction (x : int : omp_out |= omp_in)
  };
};

#pragma omp declare reduction (x : int : omp_out |= omp_in) initializer
(omp_priv = 0)
==

bug.cc: In function 'void omp declare reduction x~i(int&)':
bug.cc:13:85: sorry, unimplemented: unexpected AST of kind decl_expr
 #pragma omp declare reduction (x : int : omp_out |= omp_in) initializer
(omp_priv = 0)
   
 ^
bug.cc:13:85: internal compiler error: in potential_constant_expression_1, at
cp/semantics.c:10426
0x6df5dc potential_constant_expression_1
../../gcc/gcc/cp/semantics.c:10426
0x5a9c14 fold_non_dependent_expr_sfinae(tree_node*, int)
../../gcc/gcc/cp/pt.c:5087
0x5a9c89 build_non_dependent_expr(tree_node*)
../../gcc/gcc/cp/pt.c:21210
0x6c3a10 finish_expr_stmt(tree_node*)
../../gcc/gcc/cp/semantics.c:628
0x66a8b4 cp_parser_omp_declare_reduction_exprs
../../gcc/gcc/cp/parser.c:30078
0x643b1a cp_parser_omp_declare_reduction
../../gcc/gcc/cp/parser.c:30291
0x64551b cp_parser_omp_declare
../../gcc/gcc/cp/parser.c:30355
0x64551b cp_parser_pragma
../../gcc/gcc/cp/parser.c:30890
0x66f661 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:10725
0x670f36 cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:3990
0x670f36 c_parse_file()
../../gcc/gcc/cp/parser.c:30999
0x78e183 c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1046
Please submit a full bug report, [etc.]

The code compiles fine without "-std=c++11".
The regression was introduced between 4.9.0 20131005 and 4.9.0 20131012.


[Bug c++/58874] [4.9 Regression] [c++11] ICE with OpenMP reduction declaration and -std=c++11

2013-10-25 Thread reichelt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58874

Volker Reichelt  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
  Known to work||4.3.0, 4.4.0, 4.5.0, 4.6.0,
   ||4.7.0, 4.8.0
   Target Milestone|--- |4.9.0
  Known to fail||4.9.0


[Bug rtl-optimization/58831] [4.8/4.9 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58831

--- Comment #10 from Richard Biener  ---
*** Bug 58865 has been marked as a duplicate of this bug. ***


[Bug target/58865] wrong code at -Os on x86_64-linux-gnu

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58865

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Richard Biener  ---
Works for me after r204051.

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


[Bug target/58685] [4.7/4.8/4.9 Regression] wrong code at -Os on x86_64-linux-gnu in 64-bit mode (affecting gcc trunk, 4.8, and 4.7)

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58685

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #2 from Richard Biener  ---
Also fixed by the fix for 58831.

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


[Bug rtl-optimization/58831] [4.8/4.9 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58831

--- Comment #11 from Richard Biener  ---
*** Bug 58685 has been marked as a duplicate of this bug. ***


[Bug rtl-optimization/58831] [4.7/4.8/4.9 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58831

Richard Biener  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
  Known to work||4.8.3, 4.9.0
 Resolution|FIXED   |---
   Target Milestone|4.8.3   |4.7.4
Summary|[4.8/4.9 Regression] wrong  |[4.7/4.8/4.9 Regression]
   |code at -O2 and -O3 on  |wrong code at -O2 and -O3
   |x86_64-linux-gnu in 64-bit  |on x86_64-linux-gnu in
   |mode|64-bit mode
  Known to fail||4.7.3, 4.8.2

--- Comment #12 from Richard Biener  ---
(In reply to Richard Biener from comment #11)
> *** Bug 58685 has been marked as a duplicate of this bug. ***

This last duplicate has a testcase that fails on the 4.7 branch as well,
adjusting target milestone and re-opened.


[Bug rtl-optimization/58831] [4.7/4.8/4.9 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58831

--- Comment #13 from Richard Biener  ---
*** Bug 58832 has been marked as a duplicate of this bug. ***


[Bug tree-optimization/58832] [4.9 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58832

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #2 from Richard Biener  ---
Loads of dups ... ;)

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


[Bug c/58872] RFC: more builtins for bit manipulation

2013-10-25 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58872

--- Comment #1 from Marc Glisse  ---
What do the arguments of brev mean?
Related to PR 50481.


[Bug target/58864] [4.8/4.9 regression] ICE in connect_traces, at dwarf2cfi.c:NNNN

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58864

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |4.8.3

--- Comment #2 from Richard Biener  ---
I cannot reproduce this with 4.8 or trunk on a x86_64 host.


[Bug other/58863] for loop not aligned at -O2 or -O3

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58863

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #6 from Richard Biener  ---
It works as designed.


[Bug c++/58874] [4.9 Regression] [c++11] ICE with OpenMP reduction declaration and -std=c++11

2013-10-25 Thread mpolacek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58874

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2013-10-25
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek  ---
Confirmed.


[Bug rtl-optimization/57425] [4.8 Regression] RTL alias analysis unprepared to handle stack slot sharing

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57425

Richard Biener  changed:

   What|Removed |Added

  Known to work||4.9.0
Summary|[4.8/4.9 regression] RTL|[4.8 Regression] RTL alias
   |alias analysis unprepared   |analysis unprepared to
   |to handle stack slot|handle stack slot sharing
   |sharing |
  Known to fail||4.8.2
   Severity|major   |normal

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


[Bug rtl-optimization/57439] [4.9 regression] FAIL: gcc.c-torture/execute/920501-6.c execution, -O1

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57439

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #14 from Richard Biener  ---
Patch was applied, thus fixed.


[Bug rtl-optimization/56833] [4.9 Regression] Valid register is over written by postreload pass

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56833

Bug 56833 depends on bug 57439, which changed state.

Bug 57439 Summary: [4.9 regression] FAIL: gcc.c-torture/execute/920501-6.c 
execution,  -O1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57439

   What|Removed |Added

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


[Bug tree-optimization/57608] [4.8/4.9 Regression] wrong code for expression at -O3 on x86_64-linux-gnu with -m32

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57608

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #6 from Richard Biener  ---
Duplicate.

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


[Bug tree-optimization/57521] [4.7 Regression] wrong code for expressions in loop at -O3

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57521

--- Comment #6 from Richard Biener  ---
*** Bug 57608 has been marked as a duplicate of this bug. ***


[Bug tree-optimization/58791] [4.9 Regression] Reassoc reuses SSA_NAMEs

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58791

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #7 from Richard Biener  ---
Fixed.  I'm not sure we want to backport any of this (well, I'm sure we won't).


[Bug c++/58875] New: No float to int conversion warning in std::inner_product(x, x_end, y, 0)

2013-10-25 Thread yangzhe1990 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58875

Bug ID: 58875
   Summary: No float to int conversion warning in
std::inner_product(x, x_end, y, 0)
   Product: gcc
   Version: 4.8.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: yangzhe1990 at gmail dot com

The correct code should be std::inner_product(x, x_end, y, 0.0), but with
-Wconversion enabled, there should be a float to int conversion warning.

Without the warning it's easy to write the wrong code and get the wrong answer.

For example, compiling

#include 
#include 

int main() {
float x[3] = {0.5, 0.5, 0.5};
std::cout << std::inner_product(x, x + 3, x, 0) << std::endl;
int y = 0;
y += x[1];
return 0;
}

generates the following warnings,

test.cpp: In function ‘int main()’:
test.cpp:8:4: warning: conversion to ‘float’ from ‘int’ may alter its value
[-Wconversion]
  y += x[1];
^
test.cpp:8:4: warning: conversion to ‘int’ from ‘float’ may alter its value
[-Wconversion]

But a warning to the inner_product line is expected.

[Bug c++/58876] New: No non-virtual-dtor warning in std::unique_ptr

2013-10-25 Thread yangzhe1990 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58876

Bug ID: 58876
   Summary: No non-virtual-dtor warning in std::unique_ptr
   Product: gcc
   Version: 4.8.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: yangzhe1990 at gmail dot com

When compiling the following code

#include 

struct A {
virtual void f() = 0;
};

struct B : public A {
virtual void f() {};
};

int main() {
std::unique_ptr p(new B());
A *q = NULL;
delete q;
return 0;
};

the compiler shows the following warning,

test.cpp: In function ‘int main()’:
test.cpp:14:9: warning: deleting object of abstract class type ‘A’ which has
non-virtual destructor will cause undefined behaviour
[-Wdelete-non-virtual-dtor]
  delete q;

But a warning at the unique_ptr line is also expected.

[Bug c++/54812] [C++11] Delete expression doesn't respect access of defaulted destructor

2013-10-25 Thread paolo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54812

--- Comment #13 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Fri Oct 25 10:54:56 2013
New Revision: 204057

URL: http://gcc.gnu.org/viewcvs?rev=204057&root=gcc&view=rev
Log:
2013-10-25  Paolo Carlini  

PR c++/54812
* g++.dg/cpp0x/defaulted47.C: New.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/defaulted47.C
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug target/54063] [4.8/4.9 regression] on powerpc64 gcc 4.8/4.9 generates larger code for global variable accesses than gcc 4.7

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54063

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2


[Bug rtl-optimization/58831] [4.7/4.8/4.9 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode

2013-10-25 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58831

--- Comment #14 from Eric Botcazou  ---
Author: ebotcazou
Date: Fri Oct 25 11:16:59 2013
New Revision: 204058

URL: http://gcc.gnu.org/viewcvs?rev=204058&root=gcc&view=rev
Log:
PR rtl-optimization/58831
* alias.c (init_alias_analysis): At the beginning of each iteration, set
the reg_seen[N] flag if static_reg_base_value[N] is non-null.

Added:
branches/gcc-4_7-branch/gcc/testsuite/gcc.c-torture/execute/pr58831.c
  - copied unchanged from r204056,
trunk/gcc/testsuite/gcc.c-torture/execute/pr58831.c
Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/alias.c
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


[Bug rtl-optimization/58831] [4.7/4.8/4.9 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode

2013-10-25 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58831

Eric Botcazou  changed:

   What|Removed |Added

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

--- Comment #15 from Eric Botcazou  ---
Fixed everywhere (and twice to be really sure :-)


[Bug go/54507] libgo testsuite does not timeout compilation

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54507

Bug 54507 depends on bug 54402, which changed state.

Bug 54402 Summary: [4.8/4.9 Regression] var-tracking does not scale
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54402

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED


[Bug debug/54402] [4.8/4.9 Regression] var-tracking does not scale

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54402

Richard Biener  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|4.8.3   |4.8.0
  Known to fail|4.8.0   |

--- Comment #35 from Richard Biener  ---
Confirmed 4.8 is faster than 4.7 now.


[Bug rtl-optimization/55092] [4.8/4.9 Regression] LRA aggravates var-tracking scalability problems

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55092

Bug 55092 depends on bug 54402, which changed state.

Bug 54402 Summary: [4.8/4.9 Regression] var-tracking does not scale
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54402

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED


[Bug c++/54652] [4.7/4.8/4.9 Regression] ICE with -g

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54652

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

--- Comment #2 from Richard Biener  ---
re-confirmed on trunk.


[Bug debug/55056] [4.8/4.9 Regression] -O0 -g missing location for register double var

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55056

Richard Biener  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #12 from Richard Biener  ---
-Og has 'l' as well

 <2><4f>: Abbrev Number: 4 (DW_TAG_formal_parameter)
<50>   DW_AT_name: u
<52>   DW_AT_decl_file   : 1
<53>   DW_AT_decl_line   : 1
<54>   DW_AT_type: <0x2d>   
<58>   DW_AT_location: 0x0  (location list)
 <2><5c>: Abbrev Number: 5 (DW_TAG_variable)
<5d>   DW_AT_name: l
<5f>   DW_AT_decl_file   : 1
<60>   DW_AT_decl_line   : 2
<61>   DW_AT_type: <0x2d>   
<65>   DW_AT_location: 0x0  (location list)


[Bug rtl-optimization/55092] [4.8/4.9 Regression] LRA aggravates var-tracking scalability problems

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55092

Richard Biener  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #11 from Richard Biener  ---


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


[Bug debug/54402] [4.8/4.9 Regression] var-tracking does not scale

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54402

Richard Biener  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

--- Comment #36 from Richard Biener  ---
*** Bug 55092 has been marked as a duplicate of this bug. ***


[Bug bootstrap/55163] [4.8/4.9 Regression] Ongoing problem with gengtype-lex.c under CygWin with CRLF text mode line endings since 4.8/4.9

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55163

Richard Biener  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #6 from Richard Biener  ---
No answer.


[Bug tree-optimization/58626] [4.9 Regression] possible array wrong code bug

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58626

--- Comment #5 from Richard Biener  ---
Author: rguenth
Date: Fri Oct 25 11:51:11 2013
New Revision: 204062

URL: http://gcc.gnu.org/viewcvs?rev=204062&root=gcc&view=rev
Log:
2013-10-25  Richard Biener  

PR tree-optimization/58626
* tree-loop-distribution.c (enum rdg_dep_type): Remove
anti_dd, output_dd and input_dd.
(struct rdg_edge): Remove level and relation members.
(RDGE_LEVEL, RDGE_RELATION): Remove.
(dot_rdg_1): Adjust.
(create_rdg_edge_for_ddr): Remove.
(create_rdg_edges_for_scalar): Adjust.
(create_edge_for_control_dependence): Likewise.
(create_rdg_edges): Split into ...
(create_rdg_flow_edges): ... this
(create_rdg_cd_edges): ... and this.
(free_rdg): Adjust.
(build_rdg): Likewise, do not compute data dependences or
add edges for them.
(pg_add_dependence_edges): New function.
(pgcmp): Likewise.
(distribute_loop): First apply all non-dependence based
partition mergings.  Then compute dependences between partitions
and merge and order partitions according to them.

* gcc.dg/torture/pr58626.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr58626.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-loop-distribution.c


[Bug tree-optimization/55936] [4.7/4.8/4.9 Regression] Missed VRP optimization

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55936

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2


[Bug tree-optimization/55936] [4.7/4.8/4.9 Regression] Missed VRP optimization

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55936

--- Comment #5 from Richard Biener  ---
Equivalences should instead of refering to SSA names (and their current
value-range) refer to value-ranges (have a hashtable of value-ranges and an
array
we can record indexes of).  Equivalences should be added exclusively by
intersect_ranges when that doesn't produce a precise result.

Alternatively as a hack to preserve the assert range we could add an
SSA name temporarily to hold it and equivalence to that.


[Bug rtl-optimization/56069] [4.7/4.8/4.9 Regression] RA pessimization

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56069

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2013-10-25
 Ever confirmed|0   |1

--- Comment #4 from Richard Biener  ---
Confirmed on trunk.


[Bug tree-optimization/56145] [4.8/4.9 Regression] Use of too much optimizations -O2 -ffast-math -floop-parallelize-all

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56145

Richard Biener  changed:

   What|Removed |Added

 Status|WAITING |NEW

--- Comment #9 from Richard Biener  ---
Confirmed on x86_64 with some 4.8 version, reducing.


[Bug libgomp/56357] [4.8/4.9 Regression] missing symbol references for libgomp when using -flto -fopenmp on mingw32

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56357

Richard Biener  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #8 from Richard Biener  ---
Closing as worksforyou.


[Bug lto/56706] [4.8/4.9 Regression] failure building CP2K at -flto -O2

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56706

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed|2013-10-16 00:00:00 |2013-10-25
 Ever confirmed|0   |1

--- Comment #6 from Richard Biener  ---
I understand that both the 4.8 branch and trunk fail?


[Bug middle-end/56729] [4.9 Regression] ICE in df_insn_delete

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56729

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #7 from Richard Biener  ---
Assuming fixed.


[Bug tree-optimization/56145] [4.8/4.9 Regression] Use of too much optimizations -O2 -ffast-math -floop-parallelize-all

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56145

Richard Biener  changed:

   What|Removed |Added

 Target|x86_64-w64-mingw32  |
   Priority|P3  |P2
 CC||grosser at gcc dot gnu.org

--- Comment #10 from Richard Biener  ---
Reduced testcase, fails on trunk and the 4.8 branch:

struct frame {
int stereo;
};
struct gr_info_s {
unsigned part2_3_length;
};
struct III_sideinfo {
unsigned main_data_begin;
struct {
struct gr_info_s gr[2];
} ch[2];
};
typedef struct mpstr_tag {
struct frame fr;
struct III_sideinfo sideinfo;
} MPSTR, *PMPSTR;
int decode_layer3_sideinfo(PMPSTR mp) 
{
  struct frame *fr = &mp->fr;
  int stereo = fr->stereo;
  int granules;
  int ch, gr, databits = 0;
  for (gr = 0; gr < granules; ++gr) {
  for (ch = 0; ch < stereo; ++ch) {
  struct gr_info_s *gr_infos = &(mp->sideinfo.ch[ch].gr[gr]);
  databits += gr_infos->part2_3_length;
  }
  }
  return databits - 8 * mp->sideinfo.main_data_begin;
}


Program received signal SIGSEGV, Segmentation fault.
0x0120c3b5 in subtract_commutative_associative_deps (scop=0x1de6ec0, 
pbbs=..., original=0x1e22200, must_raw=0x7fffd5f8, 
may_raw=0x7fffd5f0, must_raw_no_source=0x0, may_raw_no_source=0x0, 
must_war=0x7fffd5e8, may_war=0x7fffd5e0, must_war_no_source=0x0, 
may_war_no_source=0x0, must_waw=0x7fffd5d8, may_waw=0x7fffd5d0, 
must_waw_no_source=0x0, may_waw_no_source=0x0)
at /space/rguenther/src/svn/trunk/gcc/graphite-dependences.c:424
424  
x_must_raw_no_source);
(gdb) l
419 gcc_assert (res == 0);
420
421 *must_raw = isl_union_map_subtract (*must_raw, x_must_raw);
422 *may_raw = isl_union_map_subtract (*may_raw, x_may_raw);
423 *must_raw_no_source = isl_union_map_subtract
(*must_raw_no_source,
424  
x_must_raw_no_source);
425 *may_raw_no_source = isl_union_map_subtract
(*may_raw_no_source,
426 
x_may_raw_no_source);
427 *must_war = isl_union_map_subtract (*must_war, x_must_war);
428 *may_war = isl_union_map_subtract (*may_war, x_may_war);
(gdb) p must_raw_no_source
$2 = (isl_union_map **) 0x0

which means that

res = isl_union_map_compute_flow (isl_union_map_copy (r),
  isl_union_map_copy (must_w),
  isl_union_map_copy (may_w),
  isl_union_map_copy (original),
  &x_must_raw, &x_may_raw,
  &x_must_raw_no_source,
  &x_may_raw_no_source);
gcc_assert (res == 0);

doesn't compute it but returns no error either.  Tobias?  maybe
that's valid and we simply should not do anything with that set then?


[Bug tree-optimization/58626] [4.9 Regression] possible array wrong code bug

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58626

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #6 from Richard Biener  ---
Fixed.


[Bug rtl-optimization/56738] [4.9 Regression] ICE in c-c++-common/torture/vshuf-v4di.c

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56738

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |WAITING
  Component|regression  |rtl-optimization

--- Comment #5 from Richard Biener  ---
Is this fixed now?


[Bug c/58872] RFC: more builtins for bit manipulation

2013-10-25 Thread yann at droneaud dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58872

Yann Droneaud  changed:

   What|Removed |Added

 CC||yann at droneaud dot fr

--- Comment #2 from Yann Droneaud  ---
(In reply to Marc Glisse from comment #1)
> What do the arguments of brev mean?
> Related to PR 50481.

The prototype for the reverse bit string builtin was designed to be useful to
reverse bits in a subset of a integer value, starting at "index" with "count"
bits.

The general use case is likely to reverse all bits in a variable, (uint64_t for
example):

uint64_t v;
__builtin_brev64(v, 0, sizeof(v) * 8);

But I thought it might be interesting to have a "more" general purpose builtin.

Actually, the builtin arguments for reverse should probably match what's
currently available on modern hardware.


[Bug libstdc++/56779] [4.8/4.9 Regression] libstdc++.so: undefined reference to `libintl_textdomain'

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56779

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2013-10-25
 Ever confirmed|0   |1

--- Comment #7 from Richard Biener  ---
I get these functions from glibc instead:

  DF *UND*    GLIBC_2.2.5 gettext
  DF *UND*    GLIBC_2.2.5 textdomain
  DF *UND*    GLIBC_2.2.5 bindtextdomain

both with and without --disable-nls.  How does configure end up adding
the lib into the link flags for libstdc++ in your case?


[Bug target/56864] [4.9 regression] FAIL: gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c scan-tree-dump-times vect "vectorized 1 loops" 0

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56864

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P1
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org


[Bug target/56865] [4.9 regression] FAIL: gcc.dg/vect/vect-42.c scan-tree-dump-times vect "Vectorizing an unaligned access" 4

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56865

Richard Biener  changed:

   What|Removed |Added

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


[Bug rtl-optimization/56885] [4.8/4.9 Regression] ICE: in assign_by_spills, at lra-assigns.c:1268 with -O -fschedule-insns -fselective-scheduling

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56885

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2


[Bug rtl-optimization/56912] [4.8/4.9 Regression] scheduler change breaks linux kernel LTO build with 4.8

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56912

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2013-10-25
 Ever confirmed|0   |1

--- Comment #5 from Richard Biener  ---
Does this issue still prevail?


[Bug fortran/57023] [4.7/4.8/4.9 Regression] Not packing arrays with changing variable used for size

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57023

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P4


[Bug fortran/57033] [4.7/4.8/4.9 Regression] ICE on extended derived type and default initialization

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57033

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P4


[Bug c++/57043] [4.7/4.8/4.9 Regression] converting overloaded complex function pow in C++11 is ambiguous

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57043

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |WAITING

--- Comment #4 from Richard Biener  ---
So this is rightfully rejected?


[Bug libstdc++/56779] [4.8/4.9 Regression] libstdc++.so: undefined reference to `libintl_textdomain'

2013-10-25 Thread fragabr at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56779

--- Comment #8 from Dâniel Fraga  ---
(In reply to Richard Biener from comment #7)
> I get these functions from glibc instead:
> 
>   DF *UND*    GLIBC_2.2.5 gettext
>   DF *UND*    GLIBC_2.2.5 textdomain
>   DF *UND*    GLIBC_2.2.5 bindtextdomain
> 
> both with and without --disable-nls.  How does configure end up adding
> the lib into the link flags for libstdc++ in your case?

Good question. How can I debug this? Is there a simple way?

[Bug rtl-optimization/57189] [4.9 Regression] Vector register is spilled for vector extract pattern

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57189

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P1


[Bug rtl-optimization/57189] [4.9 Regression] Vector register is spilled for vector extract pattern

2013-10-25 Thread graham.stott at btinternet dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57189

--- Comment #2 from graham.stott at btinternet dot com ---

 From: rguenth at gcc dot gnu.org 
To: gcc-bugs@gcc.gnu.org 
Sent: Friday, 25 October 2013, 14:11
Subject: [Bug rtl-optimization/57189] [4.9 Regression] Vector register is
spilled for vector extract pattern


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

Richard Biener  changed:

           What    |Removed                     |Added

           Priority|P3                          |P1

[Bug rtl-optimization/56738] [4.9 Regression] ICE in c-c++-common/torture/vshuf-v4di.c

2013-10-25 Thread ktkachov at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56738

--- Comment #6 from ktkachov at gcc dot gnu.org ---
(In reply to Richard Biener from comment #5)
> Is this fixed now?

Fixed on arm. Nature of the fix seems to suggest that powerpc should be fixed
as well?


[Bug target/56864] [4.9 regression] FAIL: gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c scan-tree-dump-times vect "vectorized 1 loops" 0

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56864

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #15 from Richard Biener  ---
Doesn't fail anymore according to

http://gcc.gnu.org/ml/gcc-testresults/2013-10/msg01946.html

and according to my cross compiler.  Also with -fvect-cost-model=dynamic
(the testsuite uses -O2 and thus now -fvect-cost-model=cheap - something
you may want to change).


[Bug target/56865] [4.9 regression] FAIL: gcc.dg/vect/vect-42.c scan-tree-dump-times vect "Vectorizing an unaligned access" 4

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56865

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #7 from Richard Biener  ---
Doesn't fail anymore according to

http://gcc.gnu.org/ml/gcc-testresults/2013-10/msg01946.html


[Bug c++/58877] New: Spurious warning: ‘’ is used uninitialized in this function

2013-10-25 Thread bluesmissionnaire at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58877

Bug ID: 58877
   Summary: Spurious warning: ‘’ is used uninitialized
in this function
   Product: gcc
   Version: 4.4.6
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: bluesmissionnaire at gmail dot com

Created attachment 31087
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31087&action=edit
source file that generates warning

g++-4.4 (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3)

/usr/bin/g++-4.4 -Wall -c -O2 anonymous_may_be_used_uninitialized.cpp
warns:

anonymous_may_be_used_uninitialized.cpp: In member function ‘void
Sorter::sort()’:
anonymous_may_be_used_uninitialized.cpp:83: warning: ‘’ is used
uninitialized in this function

When I decrease optimization level to 1 this warning disappears.

I checked test files attached to multiple similar bugs but none of them
generated this warning. That is why I am creating a new bug.

Using http://gcc.godbolt.org/ I could check that assembly output is generated
for all gcc versions available there (v4.4.7 -> v4.8) so I suspect this problem
was somehowe fixed in 4.4.7. Anyway, I attach the code that I managed to get
and still have this warning. Maybe you want to add this to your regression
suite.

[Bug c++/58878] New: Template parameter name can be hidden in a template member function defined inside the class specifier

2013-10-25 Thread roger.ferrer at bsc dot es
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58878

Bug ID: 58878
   Summary: Template parameter name can be hidden in a template
member function defined inside the class specifier
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: roger.ferrer at bsc dot es

Hi,

g++ allows declarations to hide a template-parameter name in template member
functions defined inside the class-specifier.

I have not been able to find whether this was expected behaviour in g++ so
I'm inclined to believe this is an error in g++.

Following is a testcase where several declarations attempt to hide
template-parameter names 't' and 's' in the scope.

g++ accepts cases 1, 5 and 6 and (I think) it should not allow them. The
remaining cases seem to be correctly diagnosed.

This fails both in g++ 4.8.1 and g++ 4.9.0 20131015 (experimental).

-- test.c
// Template-members of non-template class
struct A
{
template 
void f()
{
int t = 1; // Error. g++ does NOT complain
}

template 
void g();
};

template 
void A::g()
{
int t = 2; // OK. g++ DOES complain
}

// (Non-template) Members of template class
template 
struct B
{
void f()
{
int t = 3; // OK. g++ DOES complain
}

void g();
};

template 
void B::g()
{
int t = 4; // OK. g++ DOES complain
}


// Template members of template class
template 
struct C
{
template 
void f()
{
int t = 5; // Error. g++ does NOT complain
int s = 6; // Error. g++ does NOT complain
}

template 
void g();
};

template 
template 
void C::g()
{
int t = 7; // OK. g++ DOES complain
int s = 8; // OK. g++ DOES complain
}
-- end of test.cc

$ g++ -c test.cc
test.cc: In member function ‘void A::g()’:
test.cc:17:9: error: declaration of ‘int t’
 int t = 2; // OK. g++ DOES complain
 ^
test.cc:14:11: error:  shadows template parm ‘class t’
 template 
   ^
test.cc: In member function ‘void B::f()’:
test.cc:26:13: error: declaration of ‘int t’
 int t = 3; // OK. g++ DOES complain
 ^
test.cc:21:11: error:  shadows template parm ‘class t’
 template 
   ^
test.cc: In member function ‘void B::g()’:
test.cc:35:9: error: declaration of ‘int t’
 int t = 4; // OK. g++ DOES complain
 ^
test.cc:32:11: error:  shadows template parm ‘class t’
 template 
   ^
test.cc: In member function ‘void C::g()’:
test.cc:58:9: error: declaration of ‘int t’
 int t = 7; // OK. g++ DOES complain
 ^
test.cc:54:11: error:  shadows template parm ‘class t’
 template 
   ^
test.cc:59:9: error: declaration of ‘int s’
 int s = 8; // OK. g++ DOES complain
 ^
test.cc:55:11: error:  shadows template parm ‘class s’
 template 

I'd expect error messages for 1, 5 and 6 to appear as well.

Kind regards,

[Bug c++/58877] Spurious warning: ‘’ is used uninitialized in this function

2013-10-25 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58877

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #2 from Paolo Carlini  ---
Cannot reproduce in active branches.


[Bug middle-end/58789] [4.8 Regression] "internal compiler error: Segmentation fault" with external definition

2013-10-25 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58789

Martin Jambor  changed:

   What|Removed |Added

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

--- Comment #6 from Martin Jambor  ---
OK, I did the bisecting and the bug has been properly fixed on trunk
by http://gcc.gnu.org/ml/gcc-patches/2013-05/msg00366.html

I did not want to backport it unless there was a bug but since there
is one now, I am going to backport both r196750 and r198743 to the 4.8
branch after testing (Honza has pre-approved it in person).


[Bug c++/58877] Spurious warning: ‘’ is used uninitialized in this function

2013-10-25 Thread bluesmissionnaire at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58877

--- Comment #1 from Przemysław Strzelczak  
---
Created attachment 31088
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31088&action=edit
/usr/bin/g++-4.4 -Wall -Wextra -save-temps -c -O2
anonymous_may_be_used_uninitialized.cpp

[Bug c++/58877] Spurious warning: ‘’ is used uninitialized in this function

2013-10-25 Thread bluesmissionnaire at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58877

--- Comment #3 from Przemysław Strzelczak  
---
Just confirmed the warning does not show up on g++-4.4 (GCC) 4.4.7 20120313
(Red Hat 4.4.7-1)

[Bug c++/58282] g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw

2013-10-25 Thread vries at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58282

--- Comment #9 from vries at gcc dot gnu.org ---
Author: vries
Date: Fri Oct 25 13:49:48 2013
New Revision: 204067

URL: http://gcc.gnu.org/viewcvs?rev=204067&root=gcc&view=rev
Log:
2013-10-25  Tom de Vries  

PR c++/58282
* except.c (build_must_not_throw_expr): Handle
flag_exceptions.

* g++.dg/tm/noexcept-6.C: New test.

Added:
branches/gcc-4_8-branch/gcc/testsuite/g++.dg/tm/noexcept-6.C
Modified:
branches/gcc-4_8-branch/gcc/cp/ChangeLog
branches/gcc-4_8-branch/gcc/cp/except.c
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog


[Bug c++/58282] g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw

2013-10-25 Thread vries at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58282

--- Comment #10 from vries at gcc dot gnu.org ---
Author: vries
Date: Fri Oct 25 14:20:06 2013
New Revision: 204069

URL: http://gcc.gnu.org/viewcvs?rev=204069&root=gcc&view=rev
Log:
2013-10-25  Tom de Vries  

PR c++/58282
* except.c (build_must_not_throw_expr): Handle
flag_exceptions.

* g++.dg/tm/noexcept-6.C: New test.

Added:
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/tm/noexcept-6.C
Modified:
branches/gcc-4_7-branch/gcc/cp/ChangeLog
branches/gcc-4_7-branch/gcc/cp/except.c
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


[Bug c++/58282] g++.dg/tm/noexcept-1.C -fno-exceptions SIGSEGV in gimple_build_eh_must_not_throw

2013-10-25 Thread vries at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58282

vries at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #11 from vries at gcc dot gnu.org ---
Fixed in trunk, and 4.7 and 4.8 branches.


[Bug c++/58878] Template parameter name can be hidden in a template member function defined inside the class specifier

2013-10-25 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58878

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2013-10-25
   Assignee|unassigned at gcc dot gnu.org  |paolo.carlini at oracle 
dot com
   Target Milestone|--- |4.9.0
 Ever confirmed|0   |1

--- Comment #1 from Paolo Carlini  ---
Seems easy.


[Bug rtl-optimization/56912] [4.8/4.9 Regression] scheduler change breaks linux kernel LTO build with 4.8

2013-10-25 Thread andi-gcc at firstfloor dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56912

--- Comment #6 from Andi Kleen  ---
Seems to be fixed.


[Bug target/58864] [4.8/4.9 regression] ICE in connect_traces, at dwarf2cfi.c:NNNN

2013-10-25 Thread ppluzhnikov at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58864

--- Comment #3 from Paul Pluzhnikov  ---
> I cannot reproduce this with 4.8 or trunk on a x86_64 host.

Strange: the crash reproduces for me using multiple independent builds of trunk
on x86_64, configured as:

../configure --prefix /tmp/gcc-svn-install --enable-linker-build-id
--disable-lto --with-linker-hash-style=gnu --disable-libstdcxx-pch
--enable-languages=c,c++

Also reproduced using a clean gcc-4_8 branch as of 2 weeks ago:
gcc (GCC) 4.8.2 20131012 (prerelease), configured similarly:
../configure --prefix /tmp/gcc-svn-4.8-install --enable-languages=c,c++
--enable-linker-build-id --with-linker-hash-style=gnu --disable-lto

t.cc: In member function 'void L::compute()':
t.cc:69:1: internal compiler error: in connect_traces, at dwarf2cfi.c:2676
 }
 ^
0x6a5ee7 connect_traces
../../gcc/dwarf2cfi.c:2676
0x6a5ee7 execute_dwarf2_frame
../../gcc/dwarf2cfi.c:2898



I just repeated a build on a clean gcc-4.8:
  URL: svn+ssh://ppluzhni...@gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch
  Revision: 204069
with exactly the same outcome.


You are using '-Os -m32', right?


[Bug lto/56706] [4.8/4.9 Regression] failure building CP2K at -flto -O2

2013-10-25 Thread Joost.VandeVondele at mat dot ethz.ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56706

Joost VandeVondele  changed:

   What|Removed |Added

 Status|WAITING |NEW

--- Comment #7 from Joost VandeVondele  
---
(In reply to Richard Biener from comment #6)
> I understand that both the 4.8 branch and trunk fail?

Correct.


[Bug c++/58878] Template parameter name can be hidden in a template member function defined inside the class specifier

2013-10-25 Thread paolo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58878

--- Comment #2 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Fri Oct 25 16:26:10 2013
New Revision: 204071

URL: http://gcc.gnu.org/viewcvs?rev=204071&root=gcc&view=rev
Log:
/cp
2013-10-25  Paolo Carlini  

PR c++/58878
* pt.c (check_template_shadow): Don't skip declarations in inline
member templates.

/testsuite
2013-10-25  Paolo Carlini  

PR c++/58878
* g++.dg/template/pr58878.C: New.

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


[Bug c++/58878] Template parameter name can be hidden in a template member function defined inside the class specifier

2013-10-25 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58878

Paolo Carlini  changed:

   What|Removed |Added

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

--- Comment #3 from Paolo Carlini  ---
Fixed for 4.9.0.


[Bug target/58879] New: PPC: Missed opportunity to use lwbrx

2013-10-25 Thread marcus at mc dot pp.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58879

Bug ID: 58879
   Summary: PPC: Missed opportunity to use lwbrx
   Product: gcc
   Version: 4.7.3
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marcus at mc dot pp.se

Hi.

Please consider the following function, compiled on PPC (32 bit):

uint32_t swap32(uint32_t *in)
{
#if 1
  uint8_t a[] = {
((*in) & (uint32_t)0xff00UL)>>24,
((*in) & (uint32_t)0x00ffUL)>>16,
((*in) & (uint32_t)0xff00UL)>>8,
(*in) & (uint32_t)0x00ffUL,
  };
#else
  const uint8_t *a = (uint8_t *)in;
#endif
  uint32_t r =
(a[0]) |
(a[1] << 8) |
(a[2] << 16) |
(a[3] << 24);

  return r;
}

With the code in the #if branch, this results in a single lwbrx instruction. 
However, with the code in the #else branch it does not (getting lbz + slwi + or
instead).

Why the uint8_t pointer?  Well, my real code is a C++ template containing the
following:

  uint8_t data[nBytes];
  T getValue() const {
T v = 0;
int i;
for (i=0; i word load already works on AMD64, and reverse order
reassembly already can give a lwbrx at least _sometimes_ on PPC, it seems like
it would be feasable at least.  And it would be a neat trick to get efficient
code from portable source, without a lot of #ifdefs and __builtin_whatevers. 
:-)

Thanks for listening

  // Marcus


[Bug fortran/58880] New: ICE on valid with FINAL function and type extension

2013-10-25 Thread abensonca at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58880

Bug ID: 58880
   Summary: ICE on valid with FINAL function and type extension
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: abensonca at gmail dot com

The following causes an ICE using gfortran 4.9.0 (r204039):

module gn
  type sl
 integer, allocatable, dimension(:) :: lv
   contains
 final :: sld
  end type sl
  type :: nde
 type(sl) :: r
  end type nde
contains
  subroutine ndm(s)
type(nde), intent(inout) :: s
type(nde):: i
i=s
  end subroutine ndm
  subroutine sld(s)
implicit none
type(sl), intent(inout) :: s
return
  end subroutine sld
end module gn

$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/home/abenson/Galacticus/Tools/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/home/abenson/Galacticus/Tools
--enable-languages=c,c++,fortran --disable-multilib
--with-gmp=/home/abenson/Galacticus/Tools
Thread model: posix
gcc version 4.9.0 20131024 (experimental) (GCC) 

$ gfortran -c tmp1.F90 -o tmp1.o
tmp1.F90: In function 'ndm':
tmp1.F90:14:0: internal compiler error: in fold_convert_loc, at
fold-const.c:1970
 i=s
 ^
0x78774d fold_convert_loc(unsigned int, tree_node*, tree_node*)
../../gcc-trunk/gcc/fold-const.c:1969
0x59d0c8 gfc_conv_descriptor_data_set(stmtblock_t*, tree_node*, tree_node*)
../../gcc-trunk/gcc/fortran/trans-array.c:178
0x5c4be8 gfc_conv_scalar_to_descriptor(gfc_se*, tree_node*, symbol_attribute)
../../gcc-trunk/gcc/fortran/trans-expr.c:72
0x599421 gfc_add_comp_finalizer_call(stmtblock_t*, tree_node*, gfc_component*,
bool)
../../gcc-trunk/gcc/fortran/trans.c:1011
0x5a7689 structure_alloc_comps
../../gcc-trunk/gcc/fortran/trans-array.c:7609
0x5c863b gfc_trans_scalar_assign(gfc_se*, gfc_se*, gfc_typespec, bool, bool,
bool)
../../gcc-trunk/gcc/fortran/trans-expr.c:6946
0x5d35a2 gfc_trans_assignment_1
../../gcc-trunk/gcc/fortran/trans-expr.c:7990
0x598f11 trans_code
../../gcc-trunk/gcc/fortran/trans.c:1622
0x5c1b5e gfc_generate_function_code(gfc_namespace*)
../../gcc-trunk/gcc/fortran/trans-decl.c:5528
0x59a6e1 gfc_generate_module_code(gfc_namespace*)
../../gcc-trunk/gcc/fortran/trans.c:1955
0x5583df translate_all_program_units
../../gcc-trunk/gcc/fortran/parse.c:4496
0x5583df gfc_parse_file()
../../gcc-trunk/gcc/fortran/parse.c:4706
0x594955 gfc_be_parse_file
../../gcc-trunk/gcc/fortran/f95-lang.c:189
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

Removing any of:

 integer, allocatable, dimension(:) :: lv
 final :: sld
 i=s

results in a successful compile.


[Bug ada/58881] New: GNAT crashes with bug box when trying to instantiate a generic package

2013-10-25 Thread contact at flyx dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58881

Bug ID: 58881
   Summary: GNAT crashes with bug box when trying to instantiate a
generic package
   Product: gcc
   Version: 4.8.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
  Assignee: unassigned at gcc dot gnu.org
  Reporter: contact at flyx dot org

When compiling attached code, I get the following bug box:

+===GNAT BUG DETECTED==+
| 4.8.1 (x86_64-apple-darwin12) Constraint_Error erroneous memory access   |
| Error detected at gl-objects-textures-with_1d_loader.ads:31:4
[gl-objects-textures-targets.ads:28:4]|
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.|
| Use a subject line meaningful to you and us to track the bug.|
| Include the entire contents of this bug box in the report.   |
| Include the exact gcc or gnatmake command that you entered.  |
| Also include sources listed below in gnatchop format |
| (concatenated together with no headers between files).   |
+==+

Attached file consists of multiple source files, to compile it, you have to do

gnatchop packed.adb
gcc -c gl_test-framebuffers.adb

This will produce the bug box.

Unfortunately, I don't have a more recent of GNAT to do more testing. I do have
GNAT GPL 2013 from AdaCore available, which includes GCC 4.7.4 and also runs
into this bug.

I tried to reproduce the bug with less code, but wasn't successful. I did
notice that removing the type Fillable_Target from the file
gl-objects-textures-with_1d_loader.ads fixes the problem.

My GCC was compiled with:

Target: x86_64-apple-darwin12
Configured with:
../gcc-4.8.1/configure \
  --prefix=/opt/gcc-4.8.1 \
  --disable-multilib \
  --enable-languages=c,c++,ada,fortran,objc,obj-c++ \
  --target=x86_64-apple-darwin12 \
  --build=x86_64-apple-darwin12
Thread model: posix


[Bug ada/58881] GNAT crashes with bug box when trying to instantiate a generic package

2013-10-25 Thread contact at flyx dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58881

--- Comment #1 from Felix  ---
Created attachment 31089
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31089&action=edit
Concatenated sources to reproduce (unpack with gnatchop)


[Bug preprocessor/58687] "#line __LINE__ ..." changes subsequent line numbers

2013-10-25 Thread mtewoodbury at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58687

Max TenEyck Woodbury  changed:

   What|Removed |Added

 CC||mtewoodbury at gmail dot com

--- Comment #2 from Max TenEyck Woodbury  ---
Grumble!

Modified testsuite/gcc.dg/cpp/line4.c to test __LINE__ use.  I think I
saw a stronger set of tests while 'googling' the problem.  I was a bit
short on understanding when I saw it, so I didn't mark it for study...

I've looked at the code that handles this.  It's in the libcpp tree.

Thw indentation is messed up.  '\t' used in many places WITHOUT consistant
tab widths.  I see spots with '\t' stops at 4 and at 8.  Indent width is
mostly 2.  Style is a bit mixed.  FOR MY OWN USE, I've cleaned this up.
The result is much more readable.

I tried a simple look-ahead hack, but no go.

Going the mild KLUGE route:  Use a special value to indicate the bad
value and emit it under special circumstances.

- define the special value CUR__LINE__ in include/libcpp.h (-1)
- modify state.in_directive to have a special value (2) when in the #line
  directive (in do_line).
- check for the CUR__LINE__ value at the end of do_line after flushing the
  tokens and use replace the special value with the current line number
  before doing the state change.
- in macro.c, __LINE__ processing, look for the special stat.in_directive
  value and return CUR__LINE__ if it has the special value.

Potential problem if someone uses __LINE__ to construct the file name.

Intrest?


[Bug rtl-optimization/58542] [4.7/4.8/4.9 Regression] Arguments of __atomic_* functions are converted in unsigned mode

2013-10-25 Thread rth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58542

--- Comment #12 from Richard Henderson  ---
Author: rth
Date: Fri Oct 25 20:06:20 2013
New Revision: 204076

URL: http://gcc.gnu.org/viewcvs?rev=204076&root=gcc&view=rev
Log:
PR rtl/58542

  * optabs.c (maybe_emit_atomic_exchange): Use create_input_operand
  instead of create_convert_operand_to.
  (maybe_emit_sync_lock_test_and_set): Likewise.
  (expand_atomic_compare_and_swap): Likewise.
  (maybe_emit_compare_and_swap_exchange_loop): Don't convert_modes.

Added:
branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/atomic-store-6.c
Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/optabs.c
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog


[Bug rtl-optimization/58542] [4.7/4.8/4.9 Regression] Arguments of __atomic_* functions are converted in unsigned mode

2013-10-25 Thread rth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58542

--- Comment #13 from Richard Henderson  ---
Author: rth
Date: Fri Oct 25 20:09:13 2013
New Revision: 204077

URL: http://gcc.gnu.org/viewcvs?rev=204077&root=gcc&view=rev
Log:
PR rtl/58542

  * optabs.c (maybe_emit_atomic_exchange): Use create_input_operand
  instead of create_convert_operand_to.
  (maybe_emit_sync_lock_test_and_set): Likewise.
  (expand_atomic_compare_and_swap): Likewise.
  (maybe_emit_compare_and_swap_exchange_loop): Don't convert_modes.

Added:
branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/atomic-store-6.c
Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/optabs.c
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


[Bug rtl-optimization/58542] [4.7/4.8/4.9 Regression] Arguments of __atomic_* functions are converted in unsigned mode

2013-10-25 Thread rth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58542

Richard Henderson  changed:

   What|Removed |Added

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

--- Comment #14 from Richard Henderson  ---
Fixed.


[Bug fortran/57957] [F03] Double free with allocatable components

2013-10-25 Thread songtao.thu at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57957

--- Comment #3 from Tao Song  ---
(In reply to janus from comment #2)
> (In reply to Tobias Burnus from comment #1) 
> > For GCC 4.9, one needs to wrap the code in the main program in BLOCK/END
> > BLOCK as otherwise the end-of-scope deallocation does not trigger, which
> > causes the failure.
> 
> Updated test case:
> 
> 
> program main
> 
>   implicit none
> 
>   type :: type1
> real, allocatable :: anum(:)
>   end type
> 
>   type :: type2
> type(type1) :: temp
>   end type
> 
> 
>   block
> type(type1) :: t1
> type(type2) :: t2
> 
> t1 = type1([0.,1.])
> t2 = type2(t1)
>   end block
> end
> 
> 
> 
> Note: The double free goes away when changing the line
> 
> t2 = type2(t1)
> 
> to
> 
> t2%temp = t1
> 
> That means the actual problem is not the auto-dealloc itself (which is done
> properly), but the construction of t2: With the second variant, a deep copy
> is done (allocating a separate chunk of memory for t2%temp), while in the
> first one t2%temp only gets a reference to the memory allocated for t1
> (which is of course wrong). Since both t1 and t2 are auto-deallocated, we
> try to free that memory twice.

Do you mean in fortran the default structure constructor would yield a shadow
copying? Is this in the standard?

Thank you.

Tao Song


[Bug c++/58882] New: ICE with invalid C99 style designated initializers

2013-10-25 Thread reichelt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58882

Bug ID: 58882
   Summary: ICE with invalid C99 style designated initializers
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: reichelt at gcc dot gnu.org

The following invalid code snippet triggers an ICE since GCC 4.7.0 (when C99
style designated initializers were introduced in the C++ front-end):

=
int a[] = { [0.] = 0 };
=

bug.cc:1:22: internal compiler error: in check_array_designated_initializer, at
cp/decl.c:4812
 int a[] = { [0.] = 0 };
  ^
0x55aa63 check_array_designated_initializer
../../gcc/gcc/cp/decl.c:4812
0x562bbf reshape_init_array_1
../../gcc/gcc/cp/decl.c:5109
0x561c79 reshape_init(tree_node*, tree_node*, int)
../../gcc/gcc/cp/decl.c:5498
0x563cd3 check_initializer
../../gcc/gcc/cp/decl.c:5667
0x5766fc cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
../../gcc/gcc/cp/decl.c:6356
0x663f57 cp_parser_init_declarator
../../gcc/gcc/cp/parser.c:16652
0x66569f cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:11066
0x6495e0 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:10947
0x6708fe cp_parser_declaration
../../gcc/gcc/cp/parser.c:10844
0x66f61a cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:10730
0x670f36 cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:3990
0x670f36 c_parse_file()
../../gcc/gcc/cp/parser.c:30999
0x78e183 c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1046
Please submit a full bug report, [etc.]


[Bug fortran/58883] New: Segmentation fault when reshaping a allocatable array to allocatable function

2013-10-25 Thread songtao.thu at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58883

Bug ID: 58883
   Summary: Segmentation fault when reshaping  a allocatable array
to allocatable function
   Product: gcc
   Version: 4.8.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: songtao.thu at gmail dot com

When I reshape a allocatable array to allocatable function output, segmentation
fault appears.

Test Case1:

program main
  implicit none

  print *, foo()
contains
  function foo()
integer, allocatable  :: foo(:,:)
integer, allocatable  :: temp(:)

temp = [1,2,3,4,5,6,7,8]
foo = reshape(temp,[2,4])
  end function
end program

However, test case2 works fine:

program main
  implicit none

  print *, foo()
contains
  function foo()
integer, allocatable  :: foo(:,:)
integer, allocatable  :: temp(:), temp2(:,:)

temp = [1,2,3,4,5,6,7,8]
temp2 = reshape(temp,[2,4])
foo = temp2! or call move_alloc(temp2,foo)
  end function
end program

Hopefully someone can figure it out.

Tao Song


[Bug tree-optimization/19831] Missing DSE/malloc/free optimization

2013-10-25 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831

--- Comment #17 from Marc Glisse  ---
void f (double * __restrict a) {
  int * __restrict p = (int*) __builtin_malloc (sizeof (int));
  *p = 42;
  __builtin_free (p);
  ++*a; // Breaks the optimization!
}

Normally, gcc now manages to remove unused malloc+write+free sequences.
However, it seems that completely unrelated operations, even after free, can
prevent this optimization (it is the detection that *p=42 is dead that fails).
That limits the effect in real-world code...

(funny that if I remove the line with free(p), gcc does manage to optimize)


[Bug rtl-optimization/58759] [4.9 Regression] wrong code (segfaults) at -O2 on x86_64-linux-gnu in 32-bit mode

2013-10-25 Thread vmakarov at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58759

--- Comment #7 from Vladimir Makarov  ---
Author: vmakarov
Date: Fri Oct 25 21:34:26 2013
New Revision: 204080

URL: http://gcc.gnu.org/viewcvs?rev=204080&root=gcc&view=rev
Log:
2013-10-25  Vladimir Makarov  

PR rtl-optimization/58759
* lra-constraints.c (lra_constraints): Remove wrong condition to
remove insn setting up an equivalent pseudo.

2013-10-25  Vladimir Makarov  

PR rtl-optimization/58759
* gcc.target/i386/pr58759.c: New.


Added:
trunk/gcc/testsuite/gcc.target/i386/pr58759.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/lra-constraints.c
trunk/gcc/testsuite/ChangeLog


  1   2   >