[Bug tree-optimization/78586] [7 Regression] Wrong code caused by printf-return-value

2016-11-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78586

--- Comment #7 from Jakub Jelinek  ---
Author: jakub
Date: Wed Nov 30 08:01:47 2016
New Revision: 242998

URL: https://gcc.gnu.org/viewcvs?rev=242998&root=gcc&view=rev
Log:
PR tree-optimization/78586
* gimple-ssa-sprintf.c (format_integer): Use TYPE_MAX_VALUE or
TYPE_MIN_VALUE or build_all_ones_cst instead of folding LSHIFT_EXPR.
Don't build_int_cst min/max twice.  Formatting fix.

* gcc.c-torture/execute/pr78586.c: New test.

Added:
trunk/gcc/testsuite/gcc.c-torture/execute/pr78586.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimple-ssa-sprintf.c
trunk/gcc/testsuite/ChangeLog

[Bug sanitizer/78532] [7 Regression] libsanitizer fails to build on sparc64-linux-gnu

2016-11-30 Thread m.ostapenko at samsung dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78532

--- Comment #6 from Maxim Ostapenko  ---
(In reply to jos...@codesourcery.com from comment #5)
> On Tue, 29 Nov 2016, m.ostapenko at samsung dot com wrote:
> 
> > /home/max/src/glibc/resolv/ns_print.c:99: undefined reference to
> > `__stack_chk_guard'
> 
> You get this if glibc and GCC have mismatched stack checking 
> configuration.  To avoid that, use the --with-glibc-version= 
> option when configuring a bootstrap GCC to be used to build glibc.
> 
> Mainline glibc's build-many-glibcs.py knows how to configure GCC and glibc 
> for building many different configurations.  It uses 
> --disable-libsanitizer, but if libsanitizer is meant to work for all glibc 
> configurations you could try removing it (adding it back for the initial 
> bootstrap GCC only) and seeing what libsanitizer problems it shows up.

Joseph, thank you for clarification.

Anyway, the failure is confirmed. I suspect it was caused by this commit in
Glibc:

ommit a059d359d86130b5fa74e04a978c8523a0293f77
Author: David S. Miller 
Date:   Tue Apr 22 17:47:12 2014 -0700

Fix sigaction conform test failures on sparc.

* sysdeps/unix/sysv/linux/sparc/bits/sigaction.h
(struct sigaction): New struct member __glibc_reserved0, change
type of sa_flags to int.

diff --git a/ChangeLog b/ChangeLog
index c3fa6e5..9319a31 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-04-22  David S. Miller  
+
+   * sysdeps/unix/sysv/linux/sparc/bits/sigaction.h
+   (struct sigaction): New struct member __glibc_reserved0, change
+   type of sa_flags to int.
+
 2014-04-22  Yufeng Zhang  

* stdlib/longlong.h (count_leading_zeros, count_trailing_zeros)
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h
b/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h
index eaccf97..7a0ca7e 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h
@@ -43,7 +43,8 @@ struct sigaction
 __sigset_t sa_mask;

 /* Special flags.  */
-unsigned long sa_flags;
+int __glibc_reserved0;
+int sa_flags;

 /* Not used by Linux/Sparc yet.  */
 void (*sa_restorer) (void);

First Glibc release I see the patch in is 2.20.

[Bug rtl-optimization/78342] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2657 (error: flow control insn inside a basic block)

2016-11-30 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78342

--- Comment #7 from Arseny Solokha  ---
Well, it's not over. W/ the same patched gcc from #comment4 I still see this:

% cat ygkelvbv.c
unsigned int ao, gl;

void
ri (void)
{
  for (;;)
{
  if (ao != 1)
ao /= 0;
  gl = 0;
}
}
% powerpc-e300c3-linux-gnu-gcc-7.0.0-alpha20161127 -Os -w -c ygkelvbv.c
ygkelvbv.c: In function 'ri':
ygkelvbv.c:12:1: error: in basic block 4:
 }
 ^
ygkelvbv.c:12:1: error: flow control insn inside a basic block
(insn 48 20 29 4 (trap_if (const_int 1 [0x1])
(const_int 0 [0])) 823 {trap}
 (nil))
ygkelvbv.c:12:1: internal compiler error: in rtl_verify_bb_insns, at
cfgrtl.c:2656
0x2bc3f1b85f5 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20161127/work/gcc-7-20161127/gcc/rtl-error.c:108
0x2bc3ed7fe87 rtl_verify_bb_insns
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20161127/work/gcc-7-20161127/gcc/cfgrtl.c:2656
0x2bc3ed7fe87 rtl_verify_flow_info_1
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20161127/work/gcc-7-20161127/gcc/cfgrtl.c:2742
0x2bc3ed7fef4 rtl_verify_flow_info
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20161127/work/gcc-7-20161127/gcc/cfgrtl.c:2984
0x2bc3ed6c08d verify_flow_info()
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20161127/work/gcc-7-20161127/gcc/cfghooks.c:258
0x2bc3f142ea1 execute_function_todo
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20161127/work/gcc-7-20161127/gcc/passes.c:1977
0x2bc3f143ceb execute_todo
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20161127/work/gcc-7-20161127/gcc/passes.c:2015

[Bug sanitizer/78532] [7 Regression] libsanitizer fails to build on sparc64-linux-gnu

2016-11-30 Thread m.ostapenko at samsung dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78532

--- Comment #7 from Maxim Ostapenko  ---
Created attachment 40197
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40197&action=edit
Fix

Right.

Attached patch fixes build error (perhaps all sparc stuff should go upstream,
because I think we already have too many local fixes?).

[Bug rtl-optimization/78590] [7 Regression] FAIL: gcc.target/aarch64/advsimd-intrinsics/vget_lane.c in change_zero_ext in combine

2016-11-30 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78590

--- Comment #3 from Segher Boessenkool  ---
Author: segher
Date: Wed Nov 30 08:24:59 2016
New Revision: 242999

URL: https://gcc.gnu.org/viewcvs?rev=242999&root=gcc&view=rev
Log:
combine: Don't mess with subregs of floating point (PR78590)

PR78590 shows a problem in change_zero_ext, where we change a zero_extend
of a subreg to a logical and.  We should only do this if the thing we are
taking the subreg of is a scalar integer, otherwise we will take a subreg
of (e.g.) a float in a different size, which is nonsensical and hits an
assert.


PR rtl-optimization/78590
* combine.c (change_zero_ext): Transform zero_extend of subregs only
if the subreg_reg is a scalar integer mode.

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

[Bug rtl-optimization/78590] [7 Regression] FAIL: gcc.target/aarch64/advsimd-intrinsics/vget_lane.c in change_zero_ext in combine

2016-11-30 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78590

Segher Boessenkool  changed:

   What|Removed |Added

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

--- Comment #4 from Segher Boessenkool  ---
Fixed.

[Bug preprocessor/78569] "internal compiler error: in get_substring_ranges_for_loc" processing sprintf buffer overflow

2016-11-30 Thread arnd at linaro dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78569

--- Comment #7 from Arnd Bergmann  ---
Confirmed fixed for all source files in which I'd seen the problem. Thanks!

[Bug tree-optimization/78608] New: gimple-ssa-sprintf.c:570:17: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'

2016-11-30 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78608

Bug ID: 78608
   Summary: gimple-ssa-sprintf.c:570:17: runtime error: negation
of -9223372036854775808 cannot be represented in type
'long int'
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: trippels at gcc dot gnu.org
CC: msebor at gcc dot gnu.org
  Target Milestone: ---

Building the Linux kernel with bootstrap-ubsan gcc shows:

gimple-ssa-sprintf.c:570:17: runtime error: negation of -9223372036854775808
cannot be represented in type 'long int'

I will try to come up with a testcase.

[Bug rtl-optimization/78583] [7 Regression] ICE on valid C code at -O3 on x86_64-linux-gnu (internal compiler error: in simplify_truncation)

2016-11-30 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78583

--- Comment #2 from Segher Boessenkool  ---
Author: segher
Date: Wed Nov 30 08:41:26 2016
New Revision: 243000

URL: https://gcc.gnu.org/viewcvs?rev=243000&root=gcc&view=rev
Log:
simplify-rtx: Add missing line for previous commit (PR78583)

The comment for the added case to simplify_truncation reads

  /* Turn (truncate:M1 (*_extract:M2 (reg:M2) (len) (pos))) into
 (*_extract:M1 (truncate:M1 (reg:M2)) (len) (pos')) if possible without
 changing len.  */

but I forgot to check the two modes M2 are actually the same.


PR rtl-optimization/78583
* simplify-rtx.c (simplify_truncation): Add check missing from the
previous commit.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/simplify-rtx.c

[Bug c++/78609] New: invalid member's visibility detection in constexpr

2016-11-30 Thread bobk-off at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78609

Bug ID: 78609
   Summary: invalid member's visibility detection in constexpr
   Product: gcc
   Version: 6.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: bobk-off at yandex dot ru
  Target Milestone: ---

All known for me version of gcc failed to compile following code with error "
error: 'char A::data [28]' is private". clang compiles ok. Looks like compiler
incorrectly interprets members visibility.

#include 

struct A
{
private:
char data[28];
public:
constexpr const char * c_str() const { return data; }

template constexpr A(char const (&str)[N]) : data()
{
for (size_t i=0;i
struct B
{
static const constexpr A name = A("Some text");
static const constexpr char * value = name.c_str();
};

template
const constexpr A B::name;

int main()
{
  volatile char d;
  const char * c = B<0>::value;
  while (*c!=0) d = *c++;  
}

[Bug c++/78609] invalid member's visibility detection in constexpr

2016-11-30 Thread bobk-off at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78609

--- Comment #1 from Fedor Bobkov  ---
To walk around this bug just change visibility of "data" member to public.

[Bug c/78584] Bug in GCC argument parser expandargv

2016-11-30 Thread boehme.marcel at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78584

--- Comment #7 from Marcel Böhme  ---
My system parameters:

KERNEL VERSION: Ubuntu 14.04.3 LTS (GNU/Linux 3.19.0-59-generic x86_64)
GLIBC: Ubuntu EGLIBC 2.19-0ubuntu6.9
FILE SYSTEM: ext4

[Bug fortran/78592] [7 Regression] ICE in gfc_find_specific_dtio_proc, at fortran/interface.c:4939

2016-11-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78592

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P4
   Target Milestone|--- |7.0

[Bug fortran/78593] [6/7 Regression] ICE in gfc_match_varspec, at fortran/primary.c:2053

2016-11-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78593

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P4
   Target Milestone|--- |6.4

[Bug target/78597] [7 regression] test case gcc.dg/torture/fp-int-convert-float128-ieee.c (and others) fail starting with r242780

2016-11-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78597

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |7.0

[Bug ipa/78599] [7 Regression] hwint.h:292:72: runtime error: shift exponent 64 is too large for 64-bit type 'long int'

2016-11-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78599

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |7.0

[Bug tree-optimization/78601] [7 regression] test case gcc.dg/uninit-pred-6_a.c and gcc.dg/uninit-pred-7_c.c fail starting with r242639

2016-11-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78601

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |7.0

[Bug tree-optimization/78604] [7 regression] test case gcc.target/powerpc/p8vector-vectorize-1.c fails starting with r242750

2016-11-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78604

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |7.0

[Bug tree-optimization/78607] [7 Regression] ICE: verify_flow_info failed (error: missing barrier after block 2)

2016-11-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78607

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |7.0

[Bug c++/71182] [6/7 Regression] parser.c cp_lexer_previous_token sanitizer detects member call on null pointer

2016-11-30 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71182

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-11-30
 CC||dmalcolm at gcc dot gnu.org,
   ||trippels at gcc dot gnu.org
   Target Milestone|--- |6.4
Summary|parser.c|[6/7 Regression] parser.c
   |cp_lexer_previous_token |cp_lexer_previous_token
   |sanitizer detects member|sanitizer detects member
   |call on null pointer|call on null pointer
 Ever confirmed|0   |1

--- Comment #1 from Markus Trippelsdorf  ---
Confirmed. Started with r231293:

commit 3d27a0fa5bfc6af64855917aa6f644d2386f8300
Author: dmalcolm 
Date:   Fri Dec 4 18:09:54 2015 +

C++ FE: expression ranges

markus@x4 tmp % UBSAN_OPTIONS=print_stacktrace=1
/var/tmp/gcc_ubsan/usr/local/bin/g++ -c parse.ii
../../gcc/gcc/cp/parser.c:768:7: runtime error: member call on null pointer of
type 'struct vec'
#0 0xb5dd4f in cp_lexer_previous_token ../../gcc/gcc/cp/parser.c:768
#1 0xb5dd4f in cp_parser_postfix_dot_deref_expression
../../gcc/gcc/cp/parser.c:7451
#2 0xb6b22d in cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:7047
#3 0xb70da1 in cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:8099
#4 0xb74cf8 in cp_parser_cast_expression ../../gcc/gcc/cp/parser.c:8776
#5 0xb76faa in cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:8877
#6 0xb79d40 in cp_parser_assignment_expression
../../gcc/gcc/cp/parser.c:9164
#7 0xb88fc0 in cp_parser_expression ../../gcc/gcc/cp/parser.c:9333
#8 0xb79f99 in cp_parser_question_colon_clause
../../gcc/gcc/cp/parser.c:9107
#9 0xb79f99 in cp_parser_assignment_expression
../../gcc/gcc/cp/parser.c:9170
#10 0xb88fc0 in cp_parser_expression ../../gcc/gcc/cp/parser.c:9333
#11 0xb9c9b0 in cp_parser_expression_statement
../../gcc/gcc/cp/parser.c:10877
#12 0xb44d29 in cp_parser_statement ../../gcc/gcc/cp/parser.c:10693
#13 0xb497a0 in cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:11019
#14 0xb49aa4 in cp_parser_compound_statement
../../gcc/gcc/cp/parser.c:10973
#15 0xb96988 in cp_parser_function_body ../../gcc/gcc/cp/parser.c:21357
#16 0xb96988 in cp_parser_ctor_initializer_opt_and_function_body
../../gcc/gcc/cp/parser.c:21393
#17 0xbb9fa2 in cp_parser_function_definition_after_declarator
../../gcc/gcc/cp/parser.c:26151
#18 0xbbb144 in cp_parser_late_parsing_for_member
../../gcc/gcc/cp/parser.c:27033
#19 0xb2e24f in cp_parser_class_specifier_1 ../../gcc/gcc/cp/parser.c:22244
#20 0xb34f42 in cp_parser_class_specifier ../../gcc/gcc/cp/parser.c:22270
#21 0xb34f42 in cp_parser_type_specifier ../../gcc/gcc/cp/parser.c:16386
#22 0xb3780c in cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:13303
#23 0xb38d5a in cp_parser_single_declaration
../../gcc/gcc/cp/parser.c:26521
#24 0xbb78ee in cp_parser_template_declaration_after_parameters
../../gcc/gcc/cp/parser.c:26212
#25 0xbb6b9a in cp_parser_explicit_template_declaration
../../gcc/gcc/cp/parser.c:26448
#26 0xbb6b9a in cp_parser_template_declaration_after_export
../../gcc/gcc/cp/parser.c:26466
#27 0xb3a349 in cp_parser_declaration ../../gcc/gcc/cp/parser.c:12445
#28 0xbec445 in cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:12364
#29 0xbecfee in cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:4368
#30 0xbecfee in c_parse_file() ../../gcc/gcc/cp/parser.c:38262
#31 0x1101f4b in c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1098
#32 0x24f370a in compile_file ../../gcc/gcc/toplev.c:463
#33 0x64bea4 in do_compile ../../gcc/gcc/toplev.c:1983
#34 0x64bea4 in toplev::main(int, char**) ../../gcc/gcc/toplev.c:2117
#35 0x64e4d6 in main ../../gcc/gcc/main.c:39
#36 0x7f2977921310 in __libc_start_main ../csu/libc-start.c:286
#37 0x64e8e9 in _start
(/var/tmp/gcc_ubsan/usr/local/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/cc1plus+0x64e8e9)

[Bug rtl-optimization/78583] [7 Regression] ICE on valid C code at -O3 on x86_64-linux-gnu (internal compiler error: in simplify_truncation)

2016-11-30 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78583

Segher Boessenkool  changed:

   What|Removed |Added

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

--- Comment #3 from Segher Boessenkool  ---
Fixed.

[Bug c++/71182] [6/7 Regression] parser.c cp_lexer_previous_token sanitizer detects member call on null pointer

2016-11-30 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71182

--- Comment #2 from Markus Trippelsdorf  ---
  760 static inline cp_token *  
  761 cp_lexer_previous_token (cp_lexer *lexer) 
  762 { 
  763   cp_token_position tp = cp_lexer_previous_token_position (lexer);
  764   
  765   /* Skip past purged tokens.  */ 
  766   while (tp->purged_p)
  767 { 
  768   gcc_assert (tp != lexer->buffer->address ());   
  769   tp--;   
  770 } 
  771   
  772   return cp_lexer_token_at (lexer, tp);   
  773 }

[Bug ipa/78555] gcc/sreal.c:232:20: runtime error: left shift of negative value -2018967552

2016-11-30 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78555

--- Comment #2 from Markus Trippelsdorf  ---
I also hit:

gcc/real.c:2890:25: runtime error: left shift of negative value -125

[Bug ipa/78555] gcc/sreal.c:232:20: runtime error: left shift of negative value -2018967552

2016-11-30 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78555

--- Comment #3 from Martin Liška  ---
Do you have a test-case (not necessarily reduced) that I can use for testing?

[Bug ipa/78555] gcc/sreal.c:232:20: runtime error: left shift of negative value -2018967552

2016-11-30 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78555

--- Comment #4 from Markus Trippelsdorf  ---
For example:

markus@x4 ~ % cat bench.ii
struct A {
  enum { __value };
};
template  _OI __copy_move_a2(_II, _OI);
template  void copy(_II, _II, _OI p3) {
  __copy_move_a2(0, p3);
}
struct B {
  template  using __iter = B;
  B(const __iter &);
};
struct C {
  C(int, int);
  B m_fn1();
};
void run(void(double *, double *));
void deque_test(double *p1, double *p2) {
  C a(0, 0);
  B b = a.m_fn1();
  copy(p1, p2, b);
}
int main() { run(deque_test); }

markus@x4 ~ % UBSAN_OPTIONS=print_stacktrace=1
/var/tmp/gcc_ubsan/usr/local/bin/g++ -c -O2 ~/bench.ii


../../gcc/gcc/sreal.c:232:20: runtime error: left shift of negative value
-1744830464
#0 0x24828f0 in sreal::operator/(sreal const&) const
../../gcc/gcc/sreal.c:232
#1 0x402f3df in edge_badness ../../gcc/gcc/ipa-inline.c:1156
#2 0x40310dd in update_edge_key ../../gcc/gcc/ipa-inline.c:1222
#3 0x403a937 in inline_small_functions ../../gcc/gcc/ipa-inline.c:1824
#4 0x403a937 in ipa_inline ../../gcc/gcc/ipa-inline.c:2434
#5 0x403a937 in execute ../../gcc/gcc/ipa-inline.c:2845
#6 0x210fc68 in execute_one_pass(opt_pass*) ../../gcc/gcc/passes.c:2370
#7 0x2113a4a in execute_ipa_pass_list(opt_pass*)
../../gcc/gcc/passes.c:2805
#8 0x142e013 in ipa_passes ../../gcc/gcc/cgraphunit.c:2339
#9 0x142e013 in symbol_table::compile() ../../gcc/gcc/cgraphunit.c:2425
#10 0x1438457 in symbol_table::compile() ../../gcc/gcc/cgraphunit.c:2587
#11 0x1438457 in symbol_table::finalize_compilation_unit()
../../gcc/gcc/cgraphunit.c:2584
#12 0x24f39c0 in compile_file ../../gcc/gcc/toplev.c:488
#13 0x64bea4 in do_compile ../../gcc/gcc/toplev.c:1983
#14 0x64bea4 in toplev::main(int, char**) ../../gcc/gcc/toplev.c:2117
#15 0x64e4d6 in main ../../gcc/gcc/main.c:39
#16 0x7f15fa124310 in __libc_start_main ../csu/libc-start.c:286
#17 0x64e8e9 in _start
(/var/tmp/gcc_ubsan/usr/local/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/cc1plus+0x64e8e9)

[Bug libstdc++/78595] Unnecessary copies in _Rb_tree

2016-11-30 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78595

--- Comment #4 from Ville Voutilainen  ---
(In reply to Jonathan Wakely from comment #3)

While I'm at it, I'll move the constraint to the return type.

[Bug sanitizer/78541] [7 Regression] ICE when compiling libquadmath/printf/printf_fp.c with -fsanitize=address

2016-11-30 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78541

--- Comment #2 from Martin Liška  ---
Author: marxin
Date: Wed Nov 30 09:26:51 2016
New Revision: 243003

URL: https://gcc.gnu.org/viewcvs?rev=243003&root=gcc&view=rev
Log:
Support nested functions (PR sanitizer/78541).

PR sanitizer/78541
* gcc.dg/asan/pr78541-2.c: New test.
* gcc.dg/asan/pr78541.c: New test.
PR sanitizer/78541
* asan.c (asan_expand_mark_ifn): Properly
select a VAR_DECL from FRAME.* component reference.

Added:
trunk/gcc/testsuite/gcc.dg/asan/pr78541-2.c
trunk/gcc/testsuite/gcc.dg/asan/pr78541.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/asan.c
trunk/gcc/testsuite/ChangeLog

[Bug sanitizer/78541] [7 Regression] ICE when compiling libquadmath/printf/printf_fp.c with -fsanitize=address

2016-11-30 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78541

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #3 from Martin Liška  ---
Fixed.

[Bug ipa/78599] [7 Regression] hwint.h:292:72: runtime error: shift exponent 64 is too large for 64-bit type 'long int'

2016-11-30 Thread prathamesh3492 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78599

--- Comment #3 from prathamesh3492 at gcc dot gnu.org ---
Created attachment 40198
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40198&action=edit
untested patch to check if type is integral or pointer type.

Hi,
Well, this seems to happen for the edge: deque_test/0 ->
_Z4copyIPd1BEvT_S2_T0_.isra.0/9.

void deque_test(double*, double*) (double * p1, double * p2)
{
  struct B b;
  struct C a;
  struct B D.2378;

   [100.0%]:
  C::C (&a, 0, 0);
  b = C::m_fn1 (&a); [return slot optimization]
  B::B (&D.2378, &b);
  _Z4copyIPd1BEvT_S2_T0_.isra.0 (&D.2378);
  D.2378 ={v} {CLOBBER};
  a ={v} {CLOBBER};
  b ={v} {CLOBBER};
  return;

}

The issue is that with -flto in propagate_bits_accross_jump_function(),
ipa_get_type() returns record_type,
and we end up with invalid precision of 0 and pass that to
ipcp_bits_lattice::meet_with(value, mask, precision)
which eventually results in the runtime error.
Gating the type on integral or pointer type works for me (attached patch).
Markus, could you check if this works for you ?

However ipcp_bits_lattice::meet_with (value, mask, precision) is only called
when jfunc->bits.known is true. In ipa_compute_jump_functions_for_edge(), we
set jfunc->bits.known to true only if parameter is of integral or pointer type,
so it shouldn't really happen that
ipcp_bits_lattice::meet_with(value, mask, precision) gets called when parameter
type is record_type. Without -flto, for the above edge, the parameter type is
reference_type, but with -flto it's appearing to be record_type.
Is this possibly the same issue of TYPE_ARG_TYPES returning bogus types during
WPA ?

Thanks,
Prathamesh

[Bug fortran/78592] [7 Regression] ICE in gfc_find_specific_dtio_proc, at fortran/interface.c:4939

2016-11-30 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78592

janus at gcc dot gnu.org changed:

   What|Removed |Added

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

[Bug ipa/78555] gcc/sreal.c:232:20: runtime error: left shift of negative value -2018967552

2016-11-30 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78555

--- Comment #5 from Markus Trippelsdorf  ---
markus@x4 ~ % cat real.ii
class A {
  int N;
  static const int D = 1 << 31;
  int &m_fn1() const;
};
int &A::m_fn1() const { int a((double)N / D); }

markus@x4 ~ % UBSAN_OPTIONS=print_stacktrace=1
/var/tmp/gcc_ubsan/usr/local/bin/g++ -c -O2 real.ii


../../gcc/gcc/real.c:2890:25: runtime error: left shift of negative value -30
#0 0x21d4a5a in real_hash(real_value const*) ../../gcc/gcc/real.c:2890
#1 0x30050c1 in inchash::add_expr(tree_node const*, inchash::hash&,
unsigned int) ../../gcc/gcc/tree.c:7805
#2 0x2c03287 in vn_nary_op_compute_hash ../../gcc/gcc/tree-ssa-sccvn.c:2594
#3 0x2c16f02 in vn_nary_op_lookup_1 ../../gcc/gcc/tree-ssa-sccvn.c:2726
#4 0x2c1737b in vn_nary_op_lookup_stmt(gimple*, vn_nary_op_s**)
../../gcc/gcc/tree-ssa-sccvn.c:2783
#5 0x2c25e07 in visit_nary_op ../../gcc/gcc/tree-ssa-sccvn.c:3457
#6 0x2c25e07 in visit_use ../../gcc/gcc/tree-ssa-sccvn.c:3894
#7 0x2c2c278 in process_scc ../../gcc/gcc/tree-ssa-sccvn.c:4128
#8 0x2c2c278 in extract_and_process_scc_for_name
../../gcc/gcc/tree-ssa-sccvn.c:4215
#9 0x2c2c278 in DFS ../../gcc/gcc/tree-ssa-sccvn.c:4267
#10 0x2c2eaa8 in sccvn_dom_walker::before_dom_children(basic_block_def*)
../../gcc/gcc/tree-ssa-sccvn.c:4733
#11 0x3e69c15 in dom_walker::walk(basic_block_def*)
../../gcc/gcc/domwalk.c:265
#12 0x2c38155 in run_scc_vn(vn_lookup_kind)
../../gcc/gcc/tree-ssa-sccvn.c:4844
#13 0x2b63d54 in execute ../../gcc/gcc/tree-ssa-pre.c:5151
#14 0x210fc68 in execute_one_pass(opt_pass*) ../../gcc/gcc/passes.c:2370
#15 0x2111afb in execute_pass_list_1 ../../gcc/gcc/passes.c:2459
#16 0x2111b24 in execute_pass_list_1 ../../gcc/gcc/passes.c:2460
#17 0x2111bb4 in execute_pass_list(function*, opt_pass*)
../../gcc/gcc/passes.c:2470
#18 0x210c885 in do_per_function_toporder(void (*)(function*, void*),
void*) ../../gcc/gcc/passes.c:1729
#19 0x2113aef in execute_ipa_pass_list(opt_pass*)
../../gcc/gcc/passes.c:2812
#20 0x142e494 in ipa_passes ../../gcc/gcc/cgraphunit.c:2286
#21 0x142e494 in symbol_table::compile() ../../gcc/gcc/cgraphunit.c:2425
#22 0x1438457 in symbol_table::compile() ../../gcc/gcc/cgraphunit.c:2587
#23 0x1438457 in symbol_table::finalize_compilation_unit()
../../gcc/gcc/cgraphunit.c:2584
#24 0x24f39c0 in compile_file ../../gcc/gcc/toplev.c:488
#25 0x64bea4 in do_compile ../../gcc/gcc/toplev.c:1983
#26 0x64bea4 in toplev::main(int, char**) ../../gcc/gcc/toplev.c:2117
#27 0x64e4d6 in main ../../gcc/gcc/main.c:39
#28 0x7f7311ca0310 in __libc_start_main ../csu/libc-start.c:286
#29 0x64e8e9 in _start
(/var/tmp/gcc_ubsan/usr/local/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/cc1plus+0x64e8e9)

[Bug fortran/78592] [7 Regression] ICE in gfc_find_specific_dtio_proc, at fortran/interface.c:4939

2016-11-30 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78592

--- Comment #2 from janus at gcc dot gnu.org ---
Author: janus
Date: Wed Nov 30 09:50:04 2016
New Revision: 243005

URL: https://gcc.gnu.org/viewcvs?rev=243005&root=gcc&view=rev
Log:
2016-11-30  Janus Weil  

PR fortran/78592
* interface.c (gfc_find_specific_dtio_proc): Rearrange code to avoid
dereferencing a null pointer.

2016-11-30  Janus Weil  

PR fortran/78592
* gfortran.dg/dtio_18.f90: New test case.

Added:
trunk/gcc/testsuite/gfortran.dg/dtio_18.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/interface.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/78592] [7 Regression] ICE in gfc_find_specific_dtio_proc, at fortran/interface.c:4939

2016-11-30 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78592

janus at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #3 from janus at gcc dot gnu.org ---
Fixed with r243005. Closing.

[Bug debug/78587] dwarf2out.c:1517:45: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int [4]'; cast to an unsigned type to negate this value to itself

2016-11-30 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78587

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-11-30
 Ever confirmed|0   |1

--- Comment #2 from Markus Trippelsdorf  ---
One additional issue:

dwarf2out.c:13840:61: runtime error: left shift of negative value -1

[Bug rtl-optimization/78342] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2657 (error: flow control insn inside a basic block)

2016-11-30 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78342

--- Comment #8 from Segher Boessenkool  ---
That one is an unrelated bug as well, nothing to do with combine.

[Bug libstdc++/66414] Regression: string::find ten times slower than strstr

2016-11-30 Thread ycn65201 at noicd dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66414

ycn65201 at noicd dot com changed:

   What|Removed |Added

 CC||ycn65201 at noicd dot com

--- Comment #1 from ycn65201 at noicd dot com ---
Hello

Also found this bug, along with other article in which it is explained why it
is slow:

http://0x80.pl/notesen/2016-10-08-slow-std-string-find.html


Please fix it

[Bug fortran/78356] [7 Regression] [OOP] segfault allocating polymorphic variable with polymorphic component with allocatable component

2016-11-30 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78356

--- Comment #11 from vehre at gcc dot gnu.org ---
Sorry, for neglecting the paper work over fixing bugs and implementing new
features ;-)

[Bug fortran/63667] [OOP] ICE with DEFERRED procedure

2016-11-30 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63667

janus at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #2 from janus at gcc dot gnu.org ---
On current trunk ...

gcc version 7.0.0 20161130 (experimental) [trunk revision 243005] (GCC)

... the ICE is gone and gfortran gives the following output on the test case:


c0.f90:21:48:

  CLASS( cu_user_function_type ) :: user_func
1
Error: Component ‘user_func’ with CLASS at (1) must be allocatable or pointer
c0.f90:32:29:

 write(*,*) this%user_func%evaluate ( r )
 1
Error: ‘user_func’ at (1) is not a member of the ‘cu_type’ structure


Closing as fixed.

[Bug fortran/78395] [OOP] error on polymorphic assignment

2016-11-30 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78395

vehre at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #10 from vehre at gcc dot gnu.org ---
Well, recent gcc-6 errors out without ICE. No need to backport. Closing.

[Bug fortran/78395] [OOP] error on polymorphic assignment

2016-11-30 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78395

janus at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |7.0

[Bug rtl-optimization/78342] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2657 (error: flow control insn inside a basic block)

2016-11-30 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78342

--- Comment #9 from Arseny Solokha  ---
(In reply to Segher Boessenkool from comment #8)
> That one is an unrelated bug as well, nothing to do with combine.

I've filed PR78610 for that one.

[Bug rtl-optimization/78610] New: [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)

2016-11-30 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78610

Bug ID: 78610
   Summary: [7 Regression] ICE in rtl_verify_bb_insns, at
cfgrtl.c:2656 (error: flow control insn inside a basic
block)
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---
Target: powerpc-*-linux-gnu*

gcc-7.0.0-alpha20161127 snapshot ICEs when compiling the following reduced
snippet (copied from PR78342 comment 7) for 32-bit BE powerpc w/ -Os or -O2:

unsigned int ao, gl;

void
ri (void)
{
  for (;;)
{
  if (ao != 1)
ao /= 0;
  gl = 0;
}
}

% powerpc-e300c3-linux-gnu-gcc-7.0.0-alpha20161127 -Os -w -c ygkelvbv.c
ygkelvbv.c: In function 'ri':
ygkelvbv.c:12:1: error: in basic block 4:
 }
 ^
ygkelvbv.c:12:1: error: flow control insn inside a basic block
(insn 48 20 29 4 (trap_if (const_int 1 [0x1])
(const_int 0 [0])) 823 {trap}
 (nil))
ygkelvbv.c:12:1: internal compiler error: in rtl_verify_bb_insns, at
cfgrtl.c:2656
0x2bc3f1b85f5 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20161127/work/gcc-7-20161127/gcc/rtl-error.c:108
0x2bc3ed7fe87 rtl_verify_bb_insns
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20161127/work/gcc-7-20161127/gcc/cfgrtl.c:2656
0x2bc3ed7fe87 rtl_verify_flow_info_1
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20161127/work/gcc-7-20161127/gcc/cfgrtl.c:2742
0x2bc3ed7fef4 rtl_verify_flow_info
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20161127/work/gcc-7-20161127/gcc/cfgrtl.c:2984
0x2bc3ed6c08d verify_flow_info()
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20161127/work/gcc-7-20161127/gcc/cfghooks.c:258
0x2bc3f142ea1 execute_function_todo
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20161127/work/gcc-7-20161127/gcc/passes.c:1977
0x2bc3f143ceb execute_todo
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20161127/work/gcc-7-20161127/gcc/passes.c:2015

Applying r242947 doesn't fix it.

[Bug rtl-optimization/78610] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)

2016-11-30 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78610

Segher Boessenkool  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-11-30
 Ever confirmed|0   |1

[Bug rtl-optimization/78610] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)

2016-11-30 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78610

Segher Boessenkool  changed:

   What|Removed |Added

 CC||segher at gcc dot gnu.org

--- Comment #1 from Segher Boessenkool  ---
This is a bug in IRA.

[Bug lto/78562] Wrong warning for built-in functions with -flto

2016-11-30 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78562

--- Comment #7 from Georg-Johann Lay  ---
Author: gjl
Date: Wed Nov 30 11:08:37 2016
New Revision: 243008

URL: https://gcc.gnu.org/viewcvs?rev=243008&root=gcc&view=rev
Log:
gcc/lto/
PR lto/78562
* lto-symtab.c (lto_symtab_merge_decls_2): Don't diagnose type
mismatch if the two types are built-in.


Modified:
trunk/gcc/lto/ChangeLog
trunk/gcc/lto/lto-symtab.c

[Bug lto/78562] Wrong warning for built-in functions with -flto

2016-11-30 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78562

Georg-Johann Lay  changed:

   What|Removed |Added

   Priority|P3  |P5
 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |7.0

--- Comment #8 from Georg-Johann Lay  ---
Fixed in v7.

[Bug target/71436] [7 Regression] Segmentation fault in arm_output_multireg_pop

2016-11-30 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71436

--- Comment #12 from Richard Earnshaw  ---
(In reply to Jakub Jelinek from comment #8)
> Or reload_completed || lra_in_progress, or punt on pseudos in the predicate.

I think these patterns can be generated during the expand of inlined memcpy
operations.

[Bug target/71436] [7 Regression] Segmentation fault in arm_output_multireg_pop

2016-11-30 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71436

--- Comment #13 from ktkachov at gcc dot gnu.org ---
(In reply to Richard Earnshaw from comment #12)
> (In reply to Jakub Jelinek from comment #8)
> > Or reload_completed || lra_in_progress, or punt on pseudos in the predicate.
> 
> I think these patterns can be generated during the expand of inlined memcpy
> operations.

Yes, but they will match the patterns in ldmstm.md since they never load more
than 4 registers

[Bug rtl-optimization/78561] Constant pool size (offset) can become stale where constant pool entires become unused

2016-11-30 Thread jgreenhalgh at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78561

James Greenhalgh  changed:

   What|Removed |Added

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

--- Comment #1 from James Greenhalgh  ---
Well, confirmed - and an easy fix is to recompute the offset data while
sweeping for valid constants at the end of compilation.

[Bug rtl-optimization/78610] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)

2016-11-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78610

Richard Biener  changed:

   What|Removed |Added

   Keywords||ra
 CC||vmakarov at gcc dot gnu.org
   Target Milestone|--- |7.0

[Bug middle-end/78566] [7 regression] gcc.dg/uninit-pred-6_[abc]*.c regressions on some non-x86 platforms

2016-11-30 Thread aldyh at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78566

--- Comment #2 from Aldy Hernandez  ---
Proposed patch:

https://gcc.gnu.org/ml/gcc-patches/2016-11/msg02900.html

[Bug tree-optimization/78601] [7 regression] test case gcc.dg/uninit-pred-6_a.c and gcc.dg/uninit-pred-7_c.c fail starting with r242639

2016-11-30 Thread aldyh at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78601

Aldy Hernandez  changed:

   What|Removed |Added

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

--- Comment #3 from Aldy Hernandez  ---
Closing as duplicate.  Patch in pr78566 is pending approval.

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

[Bug middle-end/78566] [7 regression] gcc.dg/uninit-pred-6_[abc]*.c regressions on some non-x86 platforms

2016-11-30 Thread aldyh at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78566

Aldy Hernandez  changed:

   What|Removed |Added

 CC||seurer at linux dot 
vnet.ibm.com

--- Comment #3 from Aldy Hernandez  ---
*** Bug 78601 has been marked as a duplicate of this bug. ***

[Bug fortran/78611] New: -march=native makes code 3x slower

2016-11-30 Thread pepalogik at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78611

Bug ID: 78611
   Summary: -march=native makes code 3x slower
   Product: gcc
   Version: 6.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: pepalogik at seznam dot cz
  Target Milestone: ---

Created attachment 40199
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40199&action=edit
Source code, include files, and inputs

Hi,

I encountered the problem in version 5.4.0, then installed 6.2.0, and it's
still the same. Details below and test case attached.

jenda@VivoBook ~/Bug reports/gfortran/6/PhSh1 $ gfortran-6 -v
Using built-in specs.
COLLECT_GCC=gfortran-6
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
6.2.0-3ubuntu11~16.04' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-6 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-libmpx --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-6-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-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,mx32 --enable-multilib
--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 6.2.0 20160901 (Ubuntu 6.2.0-3ubuntu11~16.04)
jenda@VivoBook ~/Bug reports/gfortran/6/PhSh1 $ gfortran-6 phsh1.f -std=legacy
-I. -o default/phsh1
jenda@VivoBook ~/Bug reports/gfortran/6/PhSh1 $ cd default/
jenda@VivoBook ~/Bug reports/gfortran/6/PhSh1/default $ time ./phsh1 < ../bmtz
 Slab or Bulk calculation?
 input 1 for Slab or 0 for Bulk
 Input the MTZ value from the substrate calculation

real72m51.345s
user72m48.584s
sys 0m0.968s
jenda@VivoBook ~/Bug reports/gfortran/6/PhSh1/default $ cd ..
jenda@VivoBook ~/Bug reports/gfortran/6/PhSh1 $ gfortran-6 phsh1.f -std=legacy
-I. -march=native -o march/phsh1
jenda@VivoBook ~/Bug reports/gfortran/6/PhSh1 $ cd march/
jenda@VivoBook ~/Bug reports/gfortran/6/PhSh1/march $ time ./phsh1 < ../bmtz
 Slab or Bulk calculation?
 input 1 for Slab or 0 for Bulk
 Input the MTZ value from the substrate calculation

real217m56.080s
user217m52.092s
sys 0m1.096s


As shown, code compiled with -march=native is 3x slower. All outputs are
identical, so it is solely a performance issue. Adding -O3 isn't very helpful.
My CPU is Intel(R) Core(TM) i3-3217U CPU @ 1.80GHz with these flags:
fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush
dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc
arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu
pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid
sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer xsave avx f16c lahf_lm epb
tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida
arat pln pts

The code is an old, single-threaded F77 program calculating crystal potentials.
Profiler shows that almost all the time is spent in subroutine MTZ.

[Bug target/71436] [7 Regression] Segmentation fault in arm_output_multireg_pop

2016-11-30 Thread bernds at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71436

--- Comment #14 from Bernd Schmidt  ---
Maybe the match_parallel predicate ought to also check that you have more than
4 loads, so that it doesn't match anything that could also be handled by
ldmstm.md.

[Bug fortran/38822] Compile-time simplification of x**(real)

2016-11-30 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38822

--- Comment #18 from janus at gcc dot gnu.org ---
AFAICS everthing is fixed here. Can we close this PR?

[Bug fortran/78611] -march=native makes code 3x slower

2016-11-30 Thread pepalogik at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78611

--- Comment #1 from Jan Lachnitt  ---
Created attachment 40200
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40200&action=edit
Smaller test case

Here is a smaller test case, which runs for a second only, not hours.

without -march=native:
real0m0.610s
user0m0.560s
sys 0m0.000s

with -march=native:
real0m1.271s
user0m1.268s
sys 0m0.000s

[Bug fortran/78611] -march=native makes code 3x slower

2016-11-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78611

--- Comment #2 from Richard Biener  ---
It's hard to guess what happens, esp. w/o optimization the difference should
be minimal.

It would be nice if you can isolate the difference to a specific architecture
flag rather than native (-march=core-avx-i ?)

[Bug fortran/78611] -march=native makes code 3x slower

2016-11-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78611

--- Comment #3 from Richard Biener  ---
Can't reproduce (with the small testcase) and -march=native on

fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush
dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc
arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64
monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt
lahf_lm ida dtherm tpr_shadow vnmi flexpriority ept vpid

(that doesn't have avx)

[Bug target/78362] [7 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1804 during libgomp build

2016-11-30 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78362

--- Comment #4 from ktkachov at gcc dot gnu.org ---
Author: ktkachov
Date: Wed Nov 30 12:18:47 2016
New Revision: 243011

URL: https://gcc.gnu.org/viewcvs?rev=243011&root=gcc&view=rev
Log:
[AArch64] PR target/78362: Make sure to only take REGNO of a register

PR target/78362
* config/aarch64/aarch64.md (add3): Extract inner expression
from a subreg in operands[1] and don't call REGNO on a non-reg
expression when deciding to force operands[2] into a reg.

* gcc.c-torture/compile/pr78362.c: New test.


Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr78362.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/aarch64/aarch64.md
trunk/gcc/testsuite/ChangeLog

[Bug fortran/78611] -march=native makes code 3x slower

2016-11-30 Thread pepalogik at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78611

--- Comment #4 from Jan Lachnitt  ---
Small test case with -march=core-avx-i:
real0m1.300s
user0m1.296s
sys 0m0.000s

I.e., reproduced.

[Bug ipa/78555] gcc/sreal.c:232:20: runtime error: left shift of negative value -2018967552

2016-11-30 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78555

--- Comment #6 from Markus Trippelsdorf  ---
Author: trippels
Date: Wed Nov 30 12:22:55 2016
New Revision: 243012

URL: https://gcc.gnu.org/viewcvs?rev=243012&root=gcc&view=rev
Log:
Fix part of PR78555 - gcc/real.c:2890:25: runtime error: left shift of negative
value -125

PR ipa/78555
* real.c (real_hash): Add cast to avoid left
shifting of negative values.

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

[Bug sanitizer/78532] [7 Regression] libsanitizer fails to build on sparc64-linux-gnu

2016-11-30 Thread chefmax at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78532

--- Comment #8 from chefmax at gcc dot gnu.org ---
Author: chefmax
Date: Wed Nov 30 12:31:07 2016
New Revision: 243014

URL: https://gcc.gnu.org/viewcvs?rev=243014&root=gcc&view=rev
Log:
PR sanitizer/78532
* sanitizer_common/sanitizer_platform_limits_posix.h
(__sanitizer_sigaction): Adjust for sparc targets and various Glibc
versions.

Modified:
trunk/libsanitizer/ChangeLog
trunk/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h

[Bug c++/78612] New: Invalid double returned from if statement containing NEON division

2016-11-30 Thread kudakov at speechpro dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78612

Bug ID: 78612
   Summary: Invalid double returned from if statement containing
NEON division
   Product: gcc
   Version: 4.5.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: kudakov at speechpro dot com
  Target Milestone: ---

Compile the program with options "-fPIC -O2 -mfpu=neon" for ARM:

#include 
typedef double TFLOAT;

TFLOAT GetValue()
{
  static const TFLOAT val[6]={0, 200, 300, 400, 500, 600};
  static int k = 0;
  TFLOAT tmp = val[k];
  k = (k+1) % 6;
  return tmp;
}

TFLOAT Inv(TFLOAT _d)
{

  if (_d - 0.01 > 0)
  {
  return 1.0f / _d;
  }
  else
  {
  return 0.0f;
  }
}

int main(int argc, char* argv[])
{

  std::cout << Inv(GetValue()) << std::endl;
  std::cout << Inv(GetValue()) << std::endl;
  std::cout << Inv(GetValue()) << std::endl;
  std::cout << Inv(GetValue()) << std::endl;

  return 0;
}

Output is:
0
inf
inf
inf

Must be:
0
0.005
0.0033
0.0025

If you use float for TFLOAT or use "-mfpu=vfpv3" results will be valid.

About used g++:
arm-cortexa9-linux-gnueabi-g++ -v
Using built-in specs.
COLLECT_GCC=arm-cortexa9-linux-gnueabi-g++
COLLECT_LTO_WRAPPER=/home/OSELAS.Toolchain-2011.02.0/arm-cortexa9-linux-gnueabi/gcc-linaro-4.5-2011.02
-0-glibc-2.13-binutils-2.21-kernel-2.6.36-sanitized/bin/../libexec/gcc/arm-cortexa9-linux-gnueabi/4.5.
2/lto-wrapper
Target: arm-cortexa9-linux-gnueabi
Configured with:
/home/adam/Downloads/OSELAS.Toolchain-2011.02.0/platform-arm-cortexa9-linux-gnueabi-g
cc-linaro-4.5-2011.02-0-glibc-2.13-binutils-2.21-kernel-2.6.36-sanitized/build-cross/gcc-linaro-4.5-20
11.02-0/configure --target=arm-cortexa9-linux-gnueabi
--with-sysroot=/opt/OSELAS.Toolchain-2011.02.0/a
rm-cortexa9-linux-gnueabi/gcc-linaro-4.5-2011.02-0-glibc-2.13-binutils-2.21-kernel-2.6.36-sanitized/sy
sroot-arm-cortexa9-linux-gnueabi --disable-multilib --with-float=softfp
--with-fpu=neon --with-cpu=cor
tex-a9 --enable-__cxa_atexit --disable-sjlj-exceptions --disable-nls
--disable-decimal-float --disable
-fixed-point --disable-win32-registry --enable-symvers=gnu
--with-pkgversion=OSELAS.Toolchain-2011.02.
0 --with-system-zlib
--with-gmp=/home/adam/Downloads/OSELAS.Toolchain-2011.02.0/platform-arm-cortexa9-
linux-gnueabi-gcc-linaro-4.5-2011.02-0-glibc-2.13-binutils-2.21-kernel-2.6.36-sanitized/sysroot-host
-
-with-mpfr=/home/adam/Downloads/OSELAS.Toolchain-2011.02.0/platform-arm-cortexa9-linux-gnueabi-gcc-lin
aro-4.5-2011.02-0-glibc-2.13-binutils-2.21-kernel-2.6.36-sanitized/sysroot-host
--prefix=/opt/OSELAS.T
oolchain-2011.02.0/arm-cortexa9-linux-gnueabi/gcc-linaro-4.5-2011.02-0-glibc-2.13-binutils-2.21-kernel
-2.6.36-sanitized --enable-languages=c,c++ --enable-threads=posix --enable-c99
--enable-long-long --en
able-libstdcxx-debug --enable-profile --enable-shared --disable-libssp
--enable-checking=release
Thread model: posix
gcc version 4.5.2 (OSELAS.Toolchain-2011.02.0)

[Bug sanitizer/78532] [7 Regression] libsanitizer fails to build on sparc64-linux-gnu

2016-11-30 Thread chefmax at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78532

--- Comment #9 from chefmax at gcc dot gnu.org ---
Author: chefmax
Date: Wed Nov 30 12:32:55 2016
New Revision: 243016

URL: https://gcc.gnu.org/viewcvs?rev=243016&root=gcc&view=rev
Log:
Add PR sanitizer/78532 patch to libsanitizer/LOCAL_PATCHES.

Modified:
trunk/libsanitizer/ChangeLog
trunk/libsanitizer/LOCAL_PATCHES

[Bug libstdc++/66414] Regression: string::find ten times slower than strstr

2016-11-30 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66414

--- Comment #2 from Jonathan Wakely  ---
Ondrej, which version is this a regression against?

[Bug tree-optimization/78586] [7 Regression] Wrong code caused by printf-return-value

2016-11-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78586

--- Comment #8 from Jakub Jelinek  ---
Created attachment 40201
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40201&action=edit
gcc7-pr78586-2.patch

Ok, attaching a patch for the minor nits listed above.

The far more important thing is that the handling of different argtype and
dirtype really doesn't work.  Consider:

__attribute__((noinline, noclone)) int
foo (int x)
{
  if (x < 4096 + 8 || x >= 4096 + 256 + 8)
return -1;
  char buf[5];
  return __builtin_sprintf (buf, "%hhd", x + 1);
}

int
main ()
{
  if (__SCHAR_MAX__ != 127 || __CHAR_BIT__ != 8 || __SIZEOF_INT__ != 4)
return 0;
  if (foo (4095 + 9) != 1
  || foo (4095 + 32) != 2
  || foo (4095 + 127) != 3
  || foo (4095 + 128) != 4
  || foo (4095 + 240) != 3
  || foo (4095 + 248) != 2
  || foo (4095 + 255) != 2
  || foo (4095 + 256) != 1)
__builtin_abort ();
  return 0;
}

We have VR_RANGE for the SSA_NAME:
  # RANGE [4105, 4360] NONZERO 4607
  _3 = x_6(D) + 1;
and because both 4105 and 4360 are positive, we use argmin 4105 and argmax 4360
and recurse with those, and the recursive call for INTEGER_CST folds the
integer to dirtype (signed char here), which yields 9 and 8 and thus we assume
that it must be exactly a single char.  But that is not true, in this case the
range of (signed char) _3 is actually [ -128, 127 ], so all values of dirtype. 
In other cases it could be a subset of the values, but still the boundary
values wouldn't be the boundary values of the range in the larger type.

Another thing is, for the non-VR_RANGE case, it sets res.argmin and res.argmax
always to the argmin and argmax values.  But those values aren't necessarily
the boundaries of actual value range, those are just some values where we
assume it will emit minimum or maximum number of characters.  So, I think if
typeprec <= argprec, we shouldn't set res.arg{min,max} at all, otherwise we
should always set it to the minimum and maximum value of the argtype.

[Bug ipa/78555] gcc/sreal.c:232:20: runtime error: left shift of negative value -2018967552

2016-11-30 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78555

--- Comment #7 from Markus Trippelsdorf  ---
Another testcase for sreal.c

markus@x4 ~ % cat test.ii
struct A {
  A();
  A(const A &);
};
struct B {
  B(int);
};
template  struct C {
  B super_t;
  C(Predicate p1, int) : super_t(0), m_predicate(p1) {}
  Predicate m_predicate;
};
template 
void make_filter_iterator(Predicate p1, Iterator) {
  C(p1, 0);
}
main() {
  A a;
  auto p = [a] {};
  make_filter_iterator(p, 0);
}

markus@x4 ~ % /var/tmp/gcc_ubsan/usr/local/bin/g++ -c -O2 test.ii
../../gcc/gcc/sreal.c:232:20: runtime error: left shift of negative value
-1744830464

[Bug rtl-optimization/78610] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)

2016-11-30 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78610

Segher Boessenkool  changed:

   What|Removed |Added

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

[Bug c++/78612] Invalid double returned from if statement containing NEON division

2016-11-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78612

--- Comment #1 from Richard Biener  ---
Note that GCC 4.5 is no longer maintained, please try GCC 5 or later.

[Bug fortran/78593] [6/7 Regression] ICE in gfc_match_varspec, at fortran/primary.c:2053

2016-11-30 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78593

--- Comment #3 from janus at gcc dot gnu.org ---
Author: janus
Date: Wed Nov 30 13:23:17 2016
New Revision: 243020

URL: https://gcc.gnu.org/viewcvs?rev=243020&root=gcc&view=rev
Log:
2016-11-30  Janus Weil  

PR fortran/78593
* primary.c (gfc_match_varspec): Check if sym is non-null to avoid ICE.

2016-11-30  Janus Weil  

PR fortran/78593
* gfortran.dg/derived_result.f90: New test case.

Added:
trunk/gcc/testsuite/gfortran.dg/derived_result.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/primary.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/78593] [6/7 Regression] ICE in gfc_match_varspec, at fortran/primary.c:2053

2016-11-30 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78593

janus at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #4 from janus at gcc dot gnu.org ---
Fixed on trunk with r243020. Will backport to gcc-6 within a week or so.

[Bug target/78362] [7 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1804 during libgomp build

2016-11-30 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78362

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #5 from ktkachov at gcc dot gnu.org ---
Fixed.

[Bug c++/78589] g++ prints instead of a function name when warning in an OpenMP outlined function

2016-11-30 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78589

--- Comment #2 from Martin Jambor  ---
(In reply to Alexander Monakov from comment #1)
> A similar issue can be seen with IPA cloning.  It's more rare, because it's
> triggered only with warnings that are issued late, after IPA transforms
> (note the extra '.constprop' in the following sample).

I think that the constprop is generally the expected behavior at this
point in time, although it would indeed be nicer if we could produce
an output that would be more user friendly (it is probably possible
that a warning is emitted only for a clone, when we know more about
the context, even in your example the warning is different with
-fno-ipa-cp).

> gcc -S -Wall -O2 t.c
> t.c: In function ‘foo.constprop’:
> t.c:5:13: warning: ‘r’ is used uninitialized in this function
> [-Wuninitialized]
>return v?v:r;

Note that you use gcc here whereas I filed this bug specifically
against g++.  In fact, if you compile your test-case with g++, you
get:

$ ~/gcc/trunk/inst/bin/g++ -Wall -S -O2 clone.c 
clone.c: In function ‘int foo(int)’:
clone.c:5:14: warning: ‘r’ is used uninitialized in this function
[-Wuninitialized]
   return v?v:r;
  ^

Also, if you remove the static keyword and compile with g++ -O3, you get
two slightly different warnings apparently for the same spot in the
same same function.

This is not to argue that we should not try to convey to the user
better what is going on, I just had a much smaller problem in mind
when filing the PR :-)

[Bug debug/78587] dwarf2out.c:1517:45: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int [4]'; cast to an unsigned type to negate this value to itself

2016-11-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78587

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek  ---
Created attachment 40202
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40202&action=edit
gcc7-pr78587.patch

Untested fix for the first issue, we even generate better debug info (and
conceptually more correct):
-   .value  0x10# Location expression size
+   .value  0xe # Location expression size
.byte   0xf3# DW_OP_GNU_entry_value
.uleb128 0x1
.byte   0x55# DW_OP_reg5
-   .byte   0x11# DW_OP_consts
-   .sleb128 -9223372036854775808
+   .byte   0xe # DW_OP_const8u
+   .quad   0x8000
.byte   0x1c# DW_OP_minus
.byte   0x9f# DW_OP_stack_value

I couldn't reproduce the other issues.

[Bug lto/78613] New: [6/7 Regression] Assembler messages: Error: can't resolve `.rodata' {.rodata section} - `.Ltext0' {.text section}

2016-11-30 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78613

Bug ID: 78613
   Summary: [6/7 Regression] Assembler messages: Error: can't
resolve `.rodata' {.rodata section} - `.Ltext0' {.text
section}
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
  Assignee: unassigned at gcc dot gnu.org
  Reporter: trippels at gcc dot gnu.org
  Target Milestone: ---

markus@x4 /tmp % cat 1.i
void foo() {}

markus@x4 /tmp % cat 2.i
asm(".section .rodata");

markus@x4 /tmp % gcc -g -flto --shared 1.i 2.i
/tmp/ccDWL0Ht.s: Assembler messages:
/tmp/ccDWL0Ht.s:38: Error: can't resolve `.rodata' {.rodata section} -
`.Ltext0' {.text section}
/tmp/ccDWL0Ht.s:101: Error: can't resolve `.rodata' {.rodata section} -
`.Ltext0' {.text section}
lto-wrapper: fatal error: /usr/x86_64-pc-linux-gnu/gcc-bin/7.0.0/gcc returned 1
exit status
compilation terminated.
/usr/lib/gcc/x86_64-pc-linux-gnu/7.0.0/../../../../x86_64-pc-linux-gnu/bin/ld:
fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status

gcc-5 was fine.

[Bug testsuite/78133] Commit r241489 adds printf specifiers not supported by newlib.

2016-11-30 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78133

amker at gcc dot gnu.org changed:

   What|Removed |Added

 CC||amker at gcc dot gnu.org

--- Comment #3 from amker at gcc dot gnu.org ---
(In reply to Martin Sebor from comment #2)
> It sounds like the gimple-ssa-sprintf pass needs to be modified to avoid
> assuming that %a is supported when it isn't.  Unless one already exists that
> might involve adding a new configuration test.  Let me look into it.

Hi Martin,
Any update on this?  Shall we bypass such tests somehow?  Thanks.

[Bug c++/78612] Invalid double returned from if statement containing NEON division

2016-11-30 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78612

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

 CC||ktkachov at gcc dot gnu.org

--- Comment #2 from ktkachov at gcc dot gnu.org ---
I can't reproduce it with anything from 4.9 or higher. I get:
0
0.005
0.0033
0.0025

[Bug debug/78587] dwarf2out.c:1517:45: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int [4]'; cast to an unsigned type to negate this value to itself

2016-11-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78587

Jakub Jelinek  changed:

   What|Removed |Added

  Attachment #40202|0   |1
is obsolete||
 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek  ---
Created attachment 40203
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40203&action=edit
gcc7-pr78587.patch

Actually I can.  Here is the full fix (untested so far).

[Bug lto/78613] [6/7 Regression] Assembler messages: Error: can't resolve `.rodata' {.rodata section} - `.Ltext0' {.text section}

2016-11-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78613

Richard Biener  changed:

   What|Removed |Added

   Keywords||wrong-code
 Status|UNCONFIRMED |NEW
   Target Milestone|--- |6.3
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
I suppose it was "fine" by luck.  LTRANS now generates

.file   ""
.text
.Ltext0:
.globl  foo
.type   foo, @function
foo:
.LFB0:
.file 1 "t2.c"
.loc 1 1 0
.cfi_startproc
pushq   %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq%rsp, %rbp
.cfi_def_cfa_register 6
.loc 1 1 0
popq%rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size   foo, .-foo
#APP
.section .rodata
.Letext0:
.section.debug_info,"",@progbits
.Ldebug_info0:
.long   0x46
.value  0x4
.long   .Ldebug_abbrev0
.byte   0x8
.uleb128 0x1
.long   .LASF0
.byte   0xc
.long   .LASF1
.long   .LASF2
.quad   .Ltext0
.quad   .Letext0-.Ltext0
...
.Ldebug_line0:
.section.debug_str,"MS",@progbits,1
.LASF2:
.string "/abuild/rguenther/obj-early-lto-debug-g/gcc"
.LASF1:
    .string ""
.LASF0:
.string "GNU GIMPLE 7.0.0 20161130 (experimental) [trunk revision
221942] -mtune=generic -march=x86-64 -mtune=generic -march=x86-64 -g
-fmath-errno -fsigned-zeros -ftrapping-math -fno-trapv -fno-strict-overflow
-fno-openmp -fno-openacc -fltrans"
.ident  "GCC: (GNU) 7.0.0 20161130 (experimental) [trunk revision
221942]"
.section.note.GNU-stack,"",@progbits


that's dwarf2out somehow emitting text_end_label when not in .text.  If it
would be a trunk regression it would be mine ;)

[Bug c++/78612] Invalid double returned from if statement containing NEON division

2016-11-30 Thread kudakov at speechpro dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78612

--- Comment #3 from Kudakov  ---
I tried compile with gcc 4.9.3 - all output is valid.

[Bug c++/78612] Invalid double returned from if statement containing NEON division

2016-11-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78612

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #4 from Richard Biener  ---
Thus fixed.

[Bug tree-optimization/78574] [7 Regression] ice on valid C code at -O2 and -O3 in both 32- and 64-bit modes on x86_64-linux-gnu (internal compiler error: Segmentation fault (program cc1))

2016-11-30 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78574

--- Comment #6 from amker at gcc dot gnu.org ---
Author: amker
Date: Wed Nov 30 14:41:09 2016
New Revision: 243026

URL: https://gcc.gnu.org/viewcvs?rev=243026&root=gcc&view=rev
Log:
PR tree-optimization/78574
* tree-ssa-loop-ivopts.c (find_deriving_biv_for_expr): Skip loop
header PHI that doesn't define biv.
gcc/testsuite
PR tree-optimization/78574
* gcc.c-torture/compile/pr78574.c: New test.

Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr78574.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-loop-ivopts.c

[Bug lto/78613] [6/7 Regression] Assembler messages: Error: can't resolve `.rodata' {.rodata section} - `.Ltext0' {.text section}

2016-11-30 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78613

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #2 from Andrew Pinski  ---
Your top level inline asm does not change the section back. There has been
other reports like this and closed as invalid due to that.

[Bug rtl-optimization/78610] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)

2016-11-30 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78610

--- Comment #2 from Segher Boessenkool  ---
Author: segher
Date: Wed Nov 30 14:47:01 2016
New Revision: 243028

URL: https://gcc.gnu.org/viewcvs?rev=243028&root=gcc&view=rev
Log:
ira: Don't substitute into TRAP_IF insns (PR78610)

In the testcase, IRA propagates a constant into a TRAP_IF insn, which
then becomes an unconditional trap.  Unconditional traps are control
flow insns so doing this requires surgery on the cfg.  We cannot do
that here, so instead refuse to do the substitution.


PR rtl-optimization/78610
* ira.c (combine_and_move_insns): Don't substitute into TRAP_IF
instructions.

gcc/testsuite/
PR rtl-optimization/78610
* gcc.c-torture/compile/pr78610.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr78610.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ira.c
trunk/gcc/testsuite/ChangeLog

[Bug tree-optimization/77445] [7 Regression] Performance drop after r239219 on coremark test

2016-11-30 Thread jgreenhalgh at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77445

James Greenhalgh  changed:

   What|Removed |Added

   Last reconfirmed|2016-09-03 00:00:00 |2016-11-30
 CC||law at gcc dot gnu.org

--- Comment #5 from James Greenhalgh  ---
I posted this on list a few weeks back:

  https://gcc.gnu.org/ml/gcc-patches/2016-10/msg01454.html

The early threader is running with speed_p set to false (second parameter to
find_jump_threads_backwards)

  unsigned int
  pass_early_thread_jumps::execute (function *fun)
  {
/* Try to thread each block with more than one successor.  */
basic_block bb;
FOR_EACH_BB_FN (bb, fun)
  {
if (EDGE_COUNT (bb->succs) > 1)
find_jump_threads_backwards (bb, false);
  }
thread_through_all_blocks (true);
return 0;
  }

So even though profile information is ignored, we think we are compiling for
size and won't thread. The relevant check in profitable_jump_thread_path is:

  if (speed_p && optimize_edge_for_speed_p (taken_edge))
{
  
}
  else if (n_insns > 1)
{
  if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "FSM jump-thread path not considered: "
 "duplication of %i insns is needed and optimizing for
size.\n",
 n_insns);
  path->pop ();
  return NULL;
}

Changing false to true (or even to optimize_bb_for_size_p ) in the above hunk
looks like it would enable some of the threading we're relying on here.

[Bug c/78498] [7 Regression] valgrind conditional jump or move depends on uninitialised value(s) in format_type_warning

2016-11-30 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78498

--- Comment #6 from David Malcolm  ---
Author: dmalcolm
Date: Wed Nov 30 14:50:43 2016
New Revision: 243030

URL: https://gcc.gnu.org/viewcvs?rev=243030&root=gcc&view=rev
Log:
libiberty: avoid reading past end of buffer in strndup/xstrndup (PR c/78498)

gcc/ChangeLog:
PR c/78498
* selftest.c (selftest::assert_strndup_eq): New function.
(selftest::test_strndup): New function.
(selftest::test_libiberty): New function.
(selftest::selftest_c_tests): Call test_libiberty.

gcc/testsuite/ChangeLog:
PR c/78498
* gcc.dg/format/pr78494.c: New test case.

libiberty/ChangeLog:
PR c/78498
* strndup.c (strlen): Delete decl.
(strnlen): Add decl.
(strndup): Call strnlen rather than strlen.
* xstrndup.c (xstrndup): Likewise.

Added:
trunk/gcc/testsuite/gcc.dg/format/pr78494.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/selftest.c
trunk/gcc/testsuite/ChangeLog
trunk/libiberty/ChangeLog
trunk/libiberty/strndup.c
trunk/libiberty/xstrndup.c

[Bug c/78498] [7 Regression] valgrind conditional jump or move depends on uninitialised value(s) in format_type_warning

2016-11-30 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78498

David Malcolm  changed:

   What|Removed |Added

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

--- Comment #7 from David Malcolm  ---
Should be fixed by r243030; marking as resolved.

[Bug rtl-optimization/78614] New: [7 Regression] ICE error: invalid rtl sharing found in the insn (verify_rtx_sharing) gcc/emit-rtl.c:2743

2016-11-30 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78614

Bug ID: 78614
   Summary: [7 Regression] ICE error: invalid rtl sharing found in
the insn (verify_rtx_sharing) gcc/emit-rtl.c:2743
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---
  Host: powerpc64le-unknown-linux-gnu
Target: powerpc64le-unknown-linux-gnu
 Build: powerpc64le-unknown-linux-gnu

$ cat tc.ii
int a, b;
void fn1(__float128 p1) { b = p1 - a; }

$ /home/marxin/Programming/gcc/objdir/./gcc/xgcc
-B/home/marxin/Programming/gcc/objdir/./gcc/   -mfloat128 tc.ii -O2
tc.ii: In function ‘void fn1(__float128)’:
tc.ii:2:39: error: invalid rtl sharing found in the insn
 void fn1(__float128 p1) { b = p1 - a; }
   ^
(insn/f 31 30 32 2 (parallel [
(set (mem/c:V4SI (plus:DI (reg/f:DI 1 1)
(reg:DI 0 0)) [2  S16 A8])
(reg:V4SI 108 31))
(unspec [
(const_int 0 [0])
] UNSPEC_STVX)
]) "tc.ii":2 -1
 (expr_list:REG_FRAME_RELATED_EXPR (parallel [
(set/f (mem/c:V4SI (plus:DI (reg/f:DI 1 1)
(const_int 32 [0x20])) [2  S16 A8])
(reg:V4SI 108 31))
(unspec [
(const_int 0 [0])
] UNSPEC_STVX)
])
(nil)))
tc.ii:2:39: error: shared rtx
(unspec [
(const_int 0 [0])
] UNSPEC_STVX)
tc.ii:2:39: internal compiler error: internal consistency failure
0x10a7f267 verify_rtx_sharing
../../gcc/emit-rtl.c:2743
0x10a7f473 verify_rtx_sharing
../../gcc/emit-rtl.c:2776
0x10a7f323 verify_rtx_sharing
../../gcc/emit-rtl.c:2758
0x10a7f877 verify_insn_sharing
../../gcc/emit-rtl.c:2830
0x10a7f977 verify_rtl_sharing()
../../gcc/emit-rtl.c:2852
0x10f56d6b execute_function_todo
../../gcc/passes.c:1982
0x10f55423 do_per_function
../../gcc/passes.c:1649
0x10f56f3f execute_todo
../../gcc/passes.c:2015

[Bug c/78498] [7 Regression] valgrind conditional jump or move depends on uninitialised value(s) in format_type_warning

2016-11-30 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78498

--- Comment #8 from David Malcolm  ---
Author: dmalcolm
Date: Wed Nov 30 14:54:43 2016
New Revision: 243031

URL: https://gcc.gnu.org/viewcvs?rev=243031&root=gcc&view=rev
Log:
Fix typo in testcase name

gcc/testsuite/ChangeLog:

PR c/78498
* gcc.dg/format/pr78494.c: Rename to...
* gcc.dg/format/pr78498.c: ...this.


Added:
trunk/gcc/testsuite/gcc.dg/format/pr78498.c
  - copied unchanged from r243030,
trunk/gcc/testsuite/gcc.dg/format/pr78494.c
Removed:
trunk/gcc/testsuite/gcc.dg/format/pr78494.c
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug rtl-optimization/78614] [7 Regression] ICE error: invalid rtl sharing found in the insn (verify_rtx_sharing) gcc/emit-rtl.c:2743

2016-11-30 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78614

--- Comment #1 from Martin Liška  ---
Or reproducible via a cross-compiler:

$ ../configure --disable-bootstrap --enable-languages=c,c++,fortran
--enable-valgrind-annotations --prefix=/home/marxin/bin/gcc3 --disable-multilib
--disable-libsanitizer --target=powerpc64le-unknown-linux

$ cat orig.ii
double __extendkftf2___high_temp;
void
fn1 (__float128 value)
{
  double __high, __low;
  __float128 __value = value;
  __low = __value - __high;
  __extendkftf2___high_temp = __low;
}

$ ./xgcc -B. orig.ii -c -O2 -mfloat128-type -mfloat128

[Bug lto/78613] [6/7 Regression] Assembler messages: Error: can't resolve `.rodata' {.rodata section} - `.Ltext0' {.text section}

2016-11-30 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78613

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|INVALID |DUPLICATE

--- Comment #3 from Andrew Pinski  ---


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

[Bug rtl-optimization/78614] [7 Regression] ICE error: invalid rtl sharing found in the insn (verify_rtx_sharing) gcc/emit-rtl.c:2743

2016-11-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78614

Richard Biener  changed:

   What|Removed |Added

Version|unknown |7.0
   Target Milestone|--- |7.0

--- Comment #2 from Richard Biener  ---
Probably older regression.

[Bug inline-asm/47071] Using -ffunction-sections produces bad assembler on my testcase

2016-11-30 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47071

Andrew Pinski  changed:

   What|Removed |Added

 CC||trippels at gcc dot gnu.org

--- Comment #3 from Andrew Pinski  ---
*** Bug 78613 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/77445] [7 Regression] Performance drop after r239219 on coremark test

2016-11-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77445

Richard Biener  changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu.org

--- Comment #6 from Richard Biener  ---
But the early threader is new and can't be responsible for the regression.

[Bug tree-optimization/78586] [7 Regression] Wrong code caused by printf-return-value

2016-11-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78586

--- Comment #9 from Jakub Jelinek  ---
Even for TYPE_PRECISION (dirtype) == TYPE_PRECISION (argtype), if one is signed
and the other is unsigned, are you sure that for VR_RANGE we do the right
thing?
Again, should be backed out by sufficient testsuite coverage.
E.g. consider:
__attribute__((noinline, noclone)) int
foo (unsigned int x)
{
  if (x < 64 || x > 2U * __INT_MAX__ - 10)
return -1;
  char buf[4];
  return __builtin_sprintf (buf, "%d", x + 1);
}
Here we don't warn with -O2 -W -Wall, but if I change buf[4] to buf[1], I get:
warning: ‘%d’ directive writing between 2 and 3 bytes into a region of size 1
and
note: directive argument in the range [65u, 4294967285u]
But the directive is not writing in between 2 and 3 bytes, it is a number in
the range [65, INT_MAX] or [INT_MIN, -11], i.e. ~[-10, 64], thus it needs in
between 2 and 11 bytes.  For the warning that is a missed-warning case, but it
wouldn't surprise me if you couldn't construct a similar testcase perhaps with
sign -> unsigned or something similar (and octal or decimal, etc., many
options) where you'd be warning even on something that is safe.

[Bug target/27855] [5/6/7 regression] reassociation causes the RA to be confused

2016-11-30 Thread bernds at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=27855

Bernd Schmidt  changed:

   What|Removed |Added

 CC||bernds at gcc dot gnu.org

--- Comment #52 from Bernd Schmidt  ---
Still seems to be an issue, although I do not see code generation like in
comment #6.

-O2 -ffast-math -msse4.1 -DTYPE=double  -fno-tree-reassoc

atlasmm   60   1000   0.077 5634.83

-O2 -ffast-math -msse4.1 -DTYPE=double

atlasmm   60   1000   0.097 4469.00

[Bug rtl-optimization/78614] [7 Regression] ICE error: invalid rtl sharing found in the insn (verify_rtx_sharing) gcc/emit-rtl.c:2743

2016-11-30 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78614

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-11-30
 Ever confirmed|0   |1

--- Comment #3 from Markus Trippelsdorf  ---
Jakub re-enabled RTL sharing verification in r243019.

ppc64le is broken since then.

[Bug c++/78615] New: error: cannot decrement a pointer to incomplete type

2016-11-30 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78615

Bug ID: 78615
   Summary: error: cannot decrement a pointer to incomplete type
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
CC: jason at gcc dot gnu.org
  Target Milestone: ---

Starting from r240889, I can't compile following test-case:

$ cat tc.ii
template  class QList
{
public:
  ~QList ();
  void node_destruct ();
};
class A
{
  int *provider ();
};
class B
{
public:
  B (A *);
  QList m_magicMatchers;
};
template 
void
QList::node_destruct ()
{
  struct QListNode *a;
  --a;
}
template  QList::~QList () { node_destruct(); }
int *
A::provider ()
{
  new B (this);
}

g++ tc.ii -c -std=c++1z
tc.ii: In instantiation of ‘void QList< 
>::node_destruct() [with  = int]’:
tc.ii:24:58:   required from ‘QList<  >::~QList() [with
 = int]’
tc.ii:11:7:   required from here
tc.ii:22:3: error: cannot decrement a pointer to incomplete type ‘QList<
 >::node_destruct() [with  =
int]::QListNode’
   --a;
   ^~~

[Bug c++/78615] error: cannot decrement a pointer to incomplete type

2016-11-30 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78615

Martin Liška  changed:

   What|Removed |Added

  Known to work||5.4.0, 6.2.0
  Known to fail||7.0

--- Comment #1 from Martin Liška  ---
clang++ 3.8.1 accepts the code.

  1   2   >