[Bug fortran/84546] [7 Regression] Bad sourced allocation of CLASS(*) with source with CLASS(*) component

2018-03-12 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84546

Paul Thomas  changed:

   What|Removed |Added

 CC||pault at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |pault at gcc dot gnu.org
Summary|[7/8 Regression] Bad|[7 Regression] Bad sourced
   |sourced allocation of   |allocation of CLASS(*) with
   |CLASS(*) with source with   |source with CLASS(*)
   |CLASS(*) component  |component

--- Comment #7 from Paul Thomas  ---
I might as well take it now I have fixed it :-)

I will take a look at PR83118 and the PR referenced therein tonight.

Paul

[Bug c++/84824] DCE fails to remove dead code of std::function constructor

2018-03-12 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84824

--- Comment #4 from Marc Glisse  ---
Probably related to PR59948, PR81000, etc. (I didn't look closely)

[Bug ipa/84825] [8 Regression] ICE in rebuild_frequencies, at predict.c:4002

2018-03-12 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84825

Martin Liška  changed:

   What|Removed |Added

   Priority|P3  |P1
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-03-12
  Known to work||7.3.0
   Assignee|unassigned at gcc dot gnu.org  |marxin at gcc dot 
gnu.org
   Target Milestone|--- |8.0
 Ever confirmed|0   |1
  Known to fail||8.0

[Bug ipa/84825] New: [8 Regression] ICE in rebuild_frequencies, at predict.c:4002

2018-03-12 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84825

Bug ID: 84825
   Summary: [8 Regression] ICE in rebuild_frequencies, at
predict.c:4002
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: ipa
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
CC: hubicka at gcc dot gnu.org, marxin at gcc dot gnu.org
  Target Milestone: ---

Starting from r249856 we ICE on:

$ g++ /home/marxin/Programming/gcc/gcc/testsuite/g++.dg/inherit/covariant4.C
/dev/null -O3 --param early-inlining-insns=0 -fno-guess-branch-probability
during GIMPLE pass: fnsplit
/home/marxin/Programming/gcc/gcc/testsuite/g++.dg/inherit/covariant4.C: In
function ‘virtual D* D::_ZTch0_v8_n32_N1D4foo2EPS_(D*)’:
/home/marxin/Programming/gcc/gcc/testsuite/g++.dg/inherit/covariant4.C:76:1:
internal compiler error: in rebuild_frequencies, at predict.c:4002
 }
 ^
0xd221ea rebuild_frequencies()
../../gcc/predict.c:4002
0xe7768d tree_function_versioning(tree_node*, tree_node*, vec*, bool, bitmap_head*, bool, bitmap_head*, basic_block_def*)
../../gcc/tree-inline.c:6095
0x9ad32a cgraph_node::create_version_clone_with_body(vec, vec*, bitmap_head*, bool,
bitmap_head*, basic_block_def*, char const*)
../../gcc/cgraphclones.c:984
0x16324bf split_function
../../gcc/ipa-split.c:1371
0x1637fb0 execute_split_functions
../../gcc/ipa-split.c:1899

[Bug target/84826] New: ICE in extract_insn, at recog.c:2304

2018-03-12 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84826

Bug ID: 84826
   Summary: ICE in extract_insn, at recog.c:2304
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
CC: amker at gcc dot gnu.org, kyrylo.tkachov at arm dot com,
ramana at gcc dot gnu.org
  Target Milestone: ---

Following ICEs:

$ arm-linux-gnueabi-gcc -Ofast -fstack-clash-protection /tmp/ice.i
/tmp/ice.i:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 a ()
 ^
/tmp/ice.i: In function ‘bar’:
/tmp/ice.i:4:8: warning: type of ‘c’ defaults to ‘int’ [-Wimplicit-int]
   void bar (c)
^~~
/tmp/ice.i: In function ‘a’:
/tmp/ice.i:9:3: warning: implicit declaration of function ‘d’
[-Wimplicit-function-declaration]
   d (bar);
   ^
/tmp/ice.i: In function ‘bar’:
/tmp/ice.i:8:3: error: unrecognizable insn:
   }
   ^
(jump_insn 49 48 50 2 (return) "/tmp/ice.i":8 -1
 (nil)
 -> return)
during RTL pass: cprop_hardreg
/tmp/ice.i:8:3: internal compiler error: in extract_insn, at recog.c:2304
0x57af55 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
.././../gcc/rtl-error.c:108
0x57af74 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
.././../gcc/rtl-error.c:116
0xaf00a7 extract_insn(rtx_insn*)
.././../gcc/recog.c:2304
0xaf10e8 extract_constrain_insn(rtx_insn*)
.././../gcc/recog.c:2203
0xaf4a07 copyprop_hardreg_forward_1
.././../gcc/regcprop.c:796
0xaf5729 execute
.././../gcc/regcprop.c:1303

$ cat ice.i

cat /tmp/ice.i
a ()
{
  int b;
  void bar (c)
  {
if (__builtin_expect (c, 0))
  ++b;
  }
  d (bar);
}

[Bug target/84826] ICE in extract_insn, at recog.c:2304 on arm-linux-gnueabi

2018-03-12 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84826

Martin Liška  changed:

   What|Removed |Added

 Target||arm-linux-gnueabi
   Last reconfirmed||2018-3-12
   Host||x86_64-unknown-linux-gnu
   Target Milestone|--- |8.0
Summary|ICE in extract_insn, at |ICE in extract_insn, at
   |recog.c:2304|recog.c:2304 on
   ||arm-linux-gnueabi

[Bug rtl-optimization/84806] [8 Regression] r258390 caused internal compiler error

2018-03-12 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84806

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2018-03-12
 CC||marxin at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Dup of PR84799?

[Bug target/84827] New: [7/8 Regression] ICE in extract_insn, at recog.c:2311

2018-03-12 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84827

Bug ID: 84827
   Summary: [7/8 Regression] ICE in extract_insn, at recog.c:2311
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
CC: jsm28 at gcc dot gnu.org
  Target Milestone: ---

Starting from r237074 we ICE on:

$ gcc
/home/marxin/Programming/gcc/gcc/testsuite/gcc.target/i386/387-builtin-fp-int-inexact.c
-Ofast -fno-fp-int-builtin-inexact -ftrapping-math
cc1: warning: -fassociative-math disabled; other options take precedence
In file included from
/home/marxin/Programming/gcc/gcc/testsuite/gcc.target/i386/387-builtin-fp-int-inexact.c:7:0:
/home/marxin/Programming/gcc/gcc/testsuite/gcc.target/i386/../../gcc.dg/torture/builtin-fp-int-inexact.c:
In function ‘main’:
/home/marxin/Programming/gcc/gcc/testsuite/gcc.target/i386/../../gcc.dg/torture/builtin-fp-int-inexact.c:70:1:
error: unrecognizable insn:
 }
 ^
(insn 130 129 131 12 (parallel [
(set (reg:XF 142)
(unspec:XF [
(reg:XF 141)
] UNSPEC_FRNDINT_FLOOR))
(clobber (reg:CC 17 flags))
])
"/home/marxin/Programming/gcc/gcc/testsuite/gcc.target/i386/../../gcc.dg/torture/builtin-fp-int-inexact.c":57
-1
 (nil))
/home/marxin/Programming/gcc/gcc/testsuite/gcc.target/i386/../../gcc.dg/torture/builtin-fp-int-inexact.c:70:1:
internal compiler error: in extract_insn, at recog.c:2311
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

[Bug target/84828] New: ICE in verify_flow_info at gcc/cfghooks.c:265

2018-03-12 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84828

Bug ID: 84828
   Summary: ICE in verify_flow_info at gcc/cfghooks.c:265
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
CC: jakub at gcc dot gnu.org
  Target Milestone: ---

It's probably an invalid code, but:

$ g++ /home/marxin/Programming/gcc/gcc/testsuite/g++.dg/ext/pr84683.C -Og
-mno-sse2
/home/marxin/Programming/gcc/gcc/testsuite/g++.dg/ext/pr84683.C: In function
‘void foo(float, double)’:
/home/marxin/Programming/gcc/gcc/testsuite/g++.dg/ext/pr84683.C:10:35: error:
output constraint 0 must specify a single register
   asm volatile ("" : "+f" (c)); // { dg-error "must specify a single
register" }
   ^
/home/marxin/Programming/gcc/gcc/testsuite/g++.dg/ext/pr84683.C:13:1: error:
insn 42 basic block pointer is 4, should be 3
 }
 ^
during RTL pass: stack
/home/marxin/Programming/gcc/gcc/testsuite/g++.dg/ext/pr84683.C:13:1: internal
compiler error: verify_flow_info failed
0x96d6d4 verify_flow_info()
../../gcc/cfghooks.c:265
0x98864e checking_verify_flow_info
../../gcc/cfghooks.h:198
0x98864e commit_edge_insertions()
../../gcc/cfgrtl.c:2085
0xd4c3a4 convert_regs
../../gcc/reg-stack.c:3254
0xd4c3a4 reg_to_stack
../../gcc/reg-stack.c:3358
0xd4c3a4 rest_of_handle_stack_regs
../../gcc/reg-stack.c:3413
0xd4c3a4 execute
../../gcc/reg-stack.c:3444

ICEs for all releases I have.

[Bug c++/84812] [8 Regression] ICE with local function

2018-03-12 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84812

Martin Liška  changed:

   What|Removed |Added

   Priority|P3  |P1
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-03-12
 CC||marxin at gcc dot gnu.org
  Known to work||7.3.0
   Target Milestone|--- |8.0
 Ever confirmed|0   |1
  Known to fail||8.0

--- Comment #1 from Martin Liška  ---
Thanks, started with r248373.

[Bug c++/84808] [8 Regression] ICE with constexpr and array

2018-03-12 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84808

Martin Liška  changed:

   What|Removed |Added

   Priority|P3  |P1
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-03-12
 CC||marxin at gcc dot gnu.org,
   ||rguenth at gcc dot gnu.org
  Known to work||7.3.0
   Target Milestone|--- |8.0
 Ever confirmed|0   |1
  Known to fail||8.0

--- Comment #1 from Martin Liška  ---
Thanks, started with r257580.

[Bug c++/84804] [8 Regression] ICE with lambda in default argument

2018-03-12 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84804

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-03-12
 CC||marxin at gcc dot gnu.org,
   ||nathan at gcc dot gnu.org
  Known to work||7.3.0
   Target Milestone|--- |8.0
 Ever confirmed|0   |1
  Known to fail||8.0

--- Comment #1 from Martin Liška  ---
Started with r254817.

[Bug c/84803] [8 Regression] ICE from ifcvt_memrefs_wont_trap with -O3

2018-03-12 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84803

Martin Liška  changed:

   What|Removed |Added

   Priority|P3  |P1
 Status|UNCONFIRMED |NEW
  Known to work||7.3.0
   Keywords||ice-on-valid-code
   Last reconfirmed||2018-03-12
 CC||jgreenhalgh at gcc dot gnu.org,
   ||marxin at gcc dot gnu.org
 Ever confirmed|0   |1
Summary|ice from|[8 Regression] ICE from
   |ifcvt_memrefs_wont_trap |ifcvt_memrefs_wont_trap
   |with -O3|with -O3
   Target Milestone|--- |8.0
  Known to fail||8.0

--- Comment #3 from Martin Liška  ---
Confirmed, started with r250619.

Reduced test-case w/o warnings:
long a;
long *b;
void c ();
void d ();
void
e (long f)
{
  if (a)
*b = f;
}
void
g ()
{
  c (g, e);
}
void
c (int f, int h ())
{
  d (f, h, "");
}
void
d (int f, int h (), char *i, char *k)
{
  int j;
  d (f, h, i + 1, k);
  while (--j)
h (*i);
}

[Bug target/84790] Miscompilation for MIPS16 with -fpic and -Os or -O2

2018-03-12 Thread nbd at nbd dot name
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84790

Felix Fietkau  changed:

   What|Removed |Added

 CC||nbd at nbd dot name

--- Comment #3 from Felix Fietkau  ---
Created attachment 43627
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43627&action=edit
Proposed fix

I've hacked up a patch that seems to fix this issue, but I have no idea if the
approach is correct.

[Bug target/84829] New: -mieee-fp causes to link with -lieee but that is no longer available

2018-03-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84829

Bug ID: 84829
   Summary: -mieee-fp causes to link with -lieee but that is no
longer available
   Product: gcc
   Version: 7.3.1
Status: UNCONFIRMED
  Keywords: rejects-valid
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rguenth at gcc dot gnu.org
CC: jakub at gcc dot gnu.org, jsm28 at gcc dot gnu.org
  Target Milestone: ---
Target: x86_64-*-*, i?86-*-*

Joseph, you removed libieee.a from glibc 2.27 but GCC still links against it
via gcc/config/gnu-user.h GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC causing
programs building with -mieee-fp.

Docs for -mieee-fp say

@item -mieee-fp
@itemx -mno-ieee-fp
@opindex mieee-fp
@opindex mno-ieee-fp
Control whether or not the compiler uses IEEE floating-point
comparisons.  These correctly handle the case where the result of a
comparison is unordered.

I'm not sure whether that warrants linking with -lieee (in the past).

[Bug tree-optimization/84830] New: [8 Regression] ICE in compute_antic, at tree-ssa-pre.c:2388

2018-03-12 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84830

Bug ID: 84830
   Summary: [8 Regression] ICE in compute_antic, at
tree-ssa-pre.c:2388
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-8.0.0-alpha20180304 snapshot (r258371) ICEs when compiling the following
snippet w/ -O2 (-O3, -Ofast, -Os) -fno-tree-ch -fno-tree-vrp:

int x0;

void
br (int yp, int oo)
{
  int *qi = &yp;

  if (oo == 0)
{
g8:
  if (x0 != 0)
x0 = yp;
  else if (oo != 0)
x0 = yp;

  if (x0 == 0)
{
  *qi = 0;
  x0 = *qi;
}

  if (x0 != 0)
{
  ++oo;
  goto g8;
}

  if (yp == oo)
yp += !!oo;
}
  else
{
  x0 = 1;
  while (x0 < 2)
{
  qi = &oo;
  ++oo;
  x0 = 1;
}
}

  goto g8;
}

% gcc-8.0.0-alpha20180304 -O2 -fno-tree-ch -fno-tree-vrp -c ww2kbrze.c
during GIMPLE pass: pre
ww2kbrze.c: In function 'br':
ww2kbrze.c:4:1: internal compiler error: in compute_antic, at
tree-ssa-pre.c:2388
 br (int yp, int oo)
 ^~
0x69d01c compute_antic
   
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20180304/work/gcc-8-20180304/gcc/tree-ssa-pre.c:2388
0x69d01c execute
   
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20180304/work/gcc-8-20180304/gcc/tree-ssa-pre.c:4144

[Bug c++/84813] internal compiler error: Segmentation fault with lambdas and constexpr variables

2018-03-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84813

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-03-12
 CC||jakub at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
Fixed with r251433 on the trunk, I'll add the testcase to trunk's testsuite.

[Bug tree-optimization/84777] -Os inhibits all vectorization

2018-03-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84777

--- Comment #10 from Richard Biener  ---
GCC 8 has the patch now.

[Bug tree-optimization/84777] -Os inhibits all vectorization

2018-03-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84777

--- Comment #11 from Richard Biener  ---
Author: rguenth
Date: Mon Mar 12 08:45:54 2018
New Revision: 258444

URL: https://gcc.gnu.org/viewcvs?rev=258444&root=gcc&view=rev
Log:
2018-03-12  Richard Biener  

PR tree-optimization/84777
* tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
force-vectorize loops ignore whether we are optimizing for size.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-loop-ch.c

[Bug target/84790] Miscompilation for MIPS16 with -fpic and -Os or -O2

2018-03-12 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84790

Eric Botcazou  changed:

   What|Removed |Added

 CC||clm at codesourcery dot com,
   ||ebotcazou at gcc dot gnu.org,
   ||matthew.fortune at imgtec dot 
com

--- Comment #4 from Eric Botcazou  ---
> I've hacked up a patch that seems to fix this issue, but I have no idea if
> the approach is correct.

This might slightly pessimize (maybe test mips_symbol_binds_local_p?) but only
a MIPS maintainer can give an informed opinion here, so CCing them.

[Bug c++/84813] [6/7 Regression] internal compiler error: Segmentation fault with lambdas and constexpr variables

2018-03-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84813

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P3  |P2
 CC||jason at gcc dot gnu.org
   Target Milestone|--- |6.5
Summary|internal compiler error:|[6/7 Regression] internal
   |Segmentation fault with |compiler error:
   |lambdas and constexpr   |Segmentation fault with
   |variables   |lambdas and constexpr
   ||variables

--- Comment #2 from Jakub Jelinek  ---
The ICE started around r201080, but it isn't clear which exact revision. 
Initially it has been:
pr84813.C: In function ‘void apply()’:
pr84813.C:11:25: internal compiler error: tree check: expected lambda_expr,
have decltype_type in cp_parser_lambda_expression, at cp/parser.c:8520
   constexpr int N = T::N;
 ^
0xf0a9ba tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../gcc/tree.c:9168
0x55211a tree_check(tree_node*, char const*, int, char const*, tree_code)
../../gcc/tree.h:3690
0x6a29a3 cp_parser_lambda_expression
../../gcc/cp/parser.c:8520
0x69b7bb cp_parser_primary_expression
../../gcc/cp/parser.c:4221
0x69e681 cp_parser_postfix_expression
../../gcc/cp/parser.c:5804
0x6a0aa7 cp_parser_unary_expression
../../gcc/cp/parser.c:7000
0x6a15fa cp_parser_cast_expression
../../gcc/cp/parser.c:7592
0x6a1668 cp_parser_binary_expression
../../gcc/cp/parser.c:7692
0x6a1d36 cp_parser_assignment_expression
../../gcc/cp/parser.c:7928
0x6a1fa0 cp_parser_expression
../../gcc/cp/parser.c:8090
0x6a21ad cp_parser_expression
../../gcc/cp/parser.c:8129
0x6a43b5 cp_parser_expression_statement
../../gcc/cp/parser.c:9384
0x6a404d cp_parser_statement
../../gcc/cp/parser.c:9235
0x6a49d3 cp_parser_statement_seq_opt
../../gcc/cp/parser.c:9509
0x6a48d4 cp_parser_compound_statement
../../gcc/cp/parser.c:9463
0x6b3431 cp_parser_function_body
../../gcc/cp/parser.c:18257
0x6b373a cp_parser_ctor_initializer_opt_and_function_body
../../gcc/cp/parser.c:18293
0x6ba671 cp_parser_function_definition_after_declarator
../../gcc/cp/parser.c:22271
0x6ba4c5 cp_parser_function_definition_from_specifiers_and_declarator
../../gcc/cp/parser.c:22192
0x6afbc2 cp_parser_init_declarator
../../gcc/cp/parser.c:16307
Starting with r210017 it segfaults in:
#0  0x00c605e1 in pointer_map_insert (pmap=0x0, p=0x7fffefcfa260) at
../../gcc/pointer-set.c:226
#1  0x005fe413 in register_local_specialization (spec=0x7fffefd0c688,
tmpl=0x7fffefcfa260) at ../../gcc/cp/pt.c:1731
#2  0x00632299 in tsubst_decl (t=0x7fffefcfa260, args=0x7fffefcfea60,
complain=0) at ../../gcc/cp/pt.c:11135
#3  0x00638e1b in tsubst_copy (t=0x7fffefcfa260, args=0x7fffefcfea60,
complain=0, in_decl=0x0) at ../../gcc/cp/pt.c:12636
#4  0x00646e1c in tsubst_copy_and_build (t=0x7fffefcfa260,
args=0x7fffefcfea60, complain=0, in_decl=0x0, function_p=false, 
...
inside dump_decl from decl_as_dwarf_string called during dwarf2out_type_decl.
Obviously, we shouldn't try to do any tsubst during that.

The r251433 changes are not backportable though.

[Bug c++/84824] DCE fails to remove dead code of std::function constructor

2018-03-12 Thread manjian2006 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84824

--- Comment #5 from linzj  ---
Change the function call to printf to asm like:
int main() {
  // printf("%d", getFunc(1)(1, 1));
  asm volatile(""
:
: "r"(getFunc(1)(1, 1)));
  return 0;
}

Will generate the concise code.
I think
  # USE = anything 
  # CLB = anything 
  printfD.984 ("%d", _1);

Force the artifact anonymous auto variable to escape the current scope.

[Bug c++/84789] [6/7/8 Regression] ICE with broken variable declaration in template class

2018-03-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84789

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
Version|unknown |8.0.1
   Target Milestone|--- |6.5

[Bug c++/84792] [6/7/8 Regression] ICE with broken typedef of a struct

2018-03-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84792

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P4
   Target Milestone|--- |6.5

[Bug tree-optimization/84794] memcpy/memmove between a struct and its first member not eliminated

2018-03-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84794

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-03-12
 Ever confirmed|0   |1

--- Comment #3 from Richard Biener  ---
 _2 = &p_4(D)->D.1965.b;

this should be canonicalized to

 _2 = p_4(D);

we don't do such canonicalization because it defeats __builtin_object_size

Eventually the laddress pass could apply such canonicalization more
aggressively
(still needs folding to trigger on the mem{cpy,move}).

[Bug c++/84813] [6/7 Regression] internal compiler error: Segmentation fault with lambdas and constexpr variables

2018-03-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84813

--- Comment #3 from Jakub Jelinek  ---
Author: jakub
Date: Mon Mar 12 09:02:36 2018
New Revision: 258445

URL: https://gcc.gnu.org/viewcvs?rev=258445&root=gcc&view=rev
Log:
PR c++/84813
* g++.dg/debug/pr84813.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/debug/pr84813.C
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug target/84799] ICE on valid code at -O1: in lra_split_hard_reg_for, at lra-assigns.c:1802

2018-03-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84799

Richard Biener  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
Version|unknown |8.0.1

--- Comment #2 from Richard Biener  ---
I believe the rev. in question has been reverted?  Make sure to add this
testcase after re-applying.

[Bug tree-optimization/84803] [8 Regression] ICE from ifcvt_memrefs_wont_trap with -O3

2018-03-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84803

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
  Component|c   |tree-optimization

--- Comment #4 from Richard Biener  ---
I will have a look.

[Bug c++/84804] [8 Regression] ICE with lambda in default argument

2018-03-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84804

Richard Biener  changed:

   What|Removed |Added

   Keywords||ice-checking
   Priority|P3  |P1

[Bug lto/84805] [8 Regression] ICE in get_odr_type, at ipa-devirt.c:2096 since r258133

2018-03-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84805

Richard Biener  changed:

   What|Removed |Added

Version|unknown |8.0.1
   Target Milestone|--- |8.0

[Bug rtl-optimization/84806] [8 Regression] r258390 caused internal compiler error

2018-03-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84806

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |8.0

[Bug other/84821] [8 Regression] ICE (unable to find a register to spill)

2018-03-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84821

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |8.0

[Bug c++/84820] [6/7/8 Regression] Bogus pointer-to-member accepted within template

2018-03-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84820

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |6.5

[Bug target/84827] [7/8 Regression] ICE in extract_insn, at recog.c:2311

2018-03-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84827

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
Version|unknown |8.0.1
   Target Milestone|--- |7.4

[Bug target/84826] ICE in extract_insn, at recog.c:2304 on arm-linux-gnueabi

2018-03-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84826

Richard Biener  changed:

   What|Removed |Added

Version|unknown |8.0.1
   Target Milestone|8.0 |---

[Bug lto/84805] [8 Regression] ICE in get_odr_type, at ipa-devirt.c:2096 since r258133

2018-03-12 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84805

--- Comment #4 from Eric Botcazou  ---
This looks an ICE on invalid code though since the ODR is violated.

[Bug tree-optimization/84811] ICE on valid code at -O3 in 64-bit mode on x86_64-linux-gnu: in smallest_mode_for_size, at stor-layout.c:355

2018-03-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84811

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  ---
Can't reproduce, neither with bootstrapped nor non-bootstrapped trunk, rtl
checking and no rtl checking and valgrind is clear too.

[Bug target/84826] ICE in extract_insn, at recog.c:2304 on arm-linux-gnueabi

2018-03-12 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84826

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 CC||ktkachov at gcc dot gnu.org
 Ever confirmed|0   |1
  Known to fail||8.0

--- Comment #1 from ktkachov at gcc dot gnu.org ---
Confirmed. -fstack-clash-protection is needed to reproduce.

[Bug tree-optimization/84824] DCE fails to remove dead code of std::function constructor

2018-03-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84824

Richard Biener  changed:

   What|Removed |Added

   Keywords||alias, missed-optimization
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-03-12
 CC||rguenth at gcc dot gnu.org
  Component|c++ |tree-optimization
 Ever confirmed|0   |1

--- Comment #6 from Richard Biener  ---
The issue is that printf () clobbers global memory and thus the std::function
object:

   [100.00%]:
  MEM[(struct __lambda0 *)&D.30227] = 1;
  D.30227._M_invoker = _M_invoke;
  D.30227.D.29944._M_manager = _M_manager;
  __builtin_printf ("%d", 3);

   [100.00%]:
  _5 = MEM[(struct _Function_base *)&D.30227]._M_manager;
  if (_5 != 0B)
goto ; [94.39%]
  else
goto ; [5.61%]

   [94.39%]:
  _5 (&MEM[(struct _Function_base *)&D.30227]._M_functor, &MEM[(struct
_Function_base *)&D.30227]._M_functor, 3);
..

we fail to CSE the load from ._M_manager across printf for this reason.
Note that D.30227 later escapes and given our "IPA mod-ref" analysis
is context insensitive this is enough to not optimize it.

I'm not sure if any std::function reorg could help with this issue.  Better
escape analysis might.

[Bug middle-end/84823] [6 Regression] x86 LRA hang on valid code (no ICE) with -fno-omit-frame-pointer

2018-03-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84823

Richard Biener  changed:

   What|Removed |Added

 Target||i?86-*-*
  Known to work||5.3.0
   Target Milestone|--- |6.5
Summary|[6 Regression?] x86 LRA |[6 Regression] x86 LRA hang
   |hang on valid code (no ICE) |on valid code (no ICE) with
   |with|-fno-omit-frame-pointer
   |-fno-omit-frame-pointer |

[Bug c++/84822] Partial specializing template internal compiler error

2018-03-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84822

Richard Biener  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-03-12
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
confirmed.

[Bug target/84786] [miscompilation] vunpcklpd accessing xmm16-22 targeting KNL

2018-03-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84786

Jakub Jelinek  changed:

   What|Removed |Added

   Keywords||wrong-code
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-03-12
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #3 from Jakub Jelinek  ---
Ah, I see the bug:
(define_insn "sse2_loadhpd"
  [(set (match_operand:V2DF 0 "nonimmediate_operand"
  "=x,v,x,v,o,o ,o")
(vec_concat:V2DF
  (vec_select:DF
(match_operand:V2DF 1 "nonimmediate_operand"
  " 0,v,0,v,0,0 ,0")
(parallel [(const_int 0)]))
  (match_operand:DF 2 "nonimmediate_operand"
  " m,m,x,v,x,*f,r")))]
While V2DFmode won't be put into %xmm16-%xmm31 without TARGET_AVX512VL, DFmode
can be, so we need an avx512vl alternative for the v for the last operand and
another one with x for avx/avx2/avx512f etc. without avx512vl.

[Bug c++/84822] Partial specializing template internal compiler error

2018-03-12 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84822

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #2 from Marek Polacek  ---
Started with r242017.  Rejected before:
error: ‘auto’ parameter not permitted in this context

[Bug lto/84805] [8 Regression] ICE in get_odr_type, at ipa-devirt.c:2096 since r258133

2018-03-12 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84805

Eric Botcazou  changed:

   What|Removed |Added

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

--- Comment #5 from Eric Botcazou  ---
Investigating.

[Bug target/84786] [miscompilation] vunpcklpd accessing xmm16-22 targeting KNL

2018-03-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84786

--- Comment #4 from Jakub Jelinek  ---
Simplified testcase for the testsuite:
/* PR target/84786 */
/* { dg-do run } */
/* { dg-options "-mavx512f -mno-avx512vl -O2" } */
/* { dg-require-effective-target avx512f } */

#include "avx512f-check.h"

typedef double V __attribute__((vector_size (16)));

__attribute__((noipa)) V
foo (V x, double y)
{
  register double z __asm ("xmm18");
  asm volatile ("" : "=v" (z) : "0" (y));
  x[1] = z;
  return x;
}

static void
avx512f_test (void)
{
  V a = foo ((V) { 1.0, 2.0 }, 3.0);
  if (a[0] != 1.0 || a[1] != 3.0)
abort ();
}

Now, the hard part is look around for similar issues (I've done it already at
some point, but this case apparently went unnoticed).

[Bug tree-optimization/84803] [8 Regression] ICE from ifcvt_memrefs_wont_trap with -O3

2018-03-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84803

--- Comment #5 from Richard Biener  ---
So the reason is that data-ref analysis doesn't consider

# VUSE <.MEM_20>
_12 = MEM[(char *)"" + 1B];

as a load.  It's an out-of-bound read which we don't fold optimistically
or replace with a trap.

At this point it's probably easiest to just handle the case of data-ref
not producing a reference for constants.

[Bug other/84821] [8 Regression] ICE (unable to find a register to spill)

2018-03-12 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84821

--- Comment #2 from Matthias Klose  ---
looks like it is working with r258445.

[Bug c++/84789] [6/7/8 Regression] ICE with broken variable declaration in template class

2018-03-12 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84789

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-03-12
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

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

[Bug fortran/84778] Issue with character arguments of specified length (does not compile)

2018-03-12 Thread david.applegate at woodplc dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84778

--- Comment #3 from david.applegate at woodplc dot com ---
Thanks for the reply and the clarification.  

I have two comments to make regarding this if I may...

1) Previous gfortran compilers were happy with the code.  I also tested g95 and
Ifort (admittedly aged versions of both).  Ifort also refused to compile the
code while g95 did compile the code (you may not care I guess).  It is slightly
irritating that gfortran is essentially not backwards compatible with previous
versions.  Maybe gfortran should compile this code unless the users specify one
of the -std=f95/f2003/f2008 switches?

2) What about array declaration? Gfortran 7.3 is happy to compile the following
code, which presumably does not conform to the standard you mention, while
Ifort refuses to compile this code:

program test2

  implicit none
  integer, parameter :: b = 5
  integer :: a(b)

  a = 4

  write(*,*)a

  call testsub(a,b)

contains

  subroutine testsub(a,b)

! integer, intent(in) :: b   ! if we put declaration of b here instead it
compiles ok

integer :: a(b)
integer, intent(in) :: b  

write(*,*)a

  end subroutine testsub
end program test2

[Bug c++/84789] [6/7/8 Regression] ICE with broken variable declaration in template class

2018-03-12 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84789

--- Comment #2 from Marek Polacek  ---
Started with r238696.

[Bug target/84786] [miscompilation] vunpcklpd accessing xmm16-22 targeting KNL

2018-03-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84786

--- Comment #5 from Jakub Jelinek  ---
Created attachment 43628
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43628&action=edit
gcc8-pr84786.patch

Untested fix.

[Bug target/84826] ICE in extract_insn, at recog.c:2304 on arm-linux-gnueabi

2018-03-12 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84826

--- Comment #2 from ktkachov at gcc dot gnu.org ---
Hmmm, the epilogue expansion in arm.md hits the HAVE_return path and does:
 emit_jump_insn (gen_return ());
with a comment saying:
 /* HAVE_return is testing for USE_RETURN_INSN (FALSE).  Hence,
no need for explicit testing again.  */

But I don't think that comment is true (maybe it was true at some point in the
past?). There is no return optab in the arm backend gated on USE_RETURN_INSN
(FALSE)

USE_RETURN_INSN (FALSE) is used to gate *arm_return, which is what the RTL is
supposed to match, but does not end up matching.
This is all quite old code, but I think the safest fix at this stage is to add
a "&& USE_RETURN_INSN (FALSE)" check to that HAVE_return so that the
arm_expand_epilogue path is taken.

[Bug middle-end/84823] [6 Regression] x86 LRA hang on valid code (no ICE) with -fno-omit-frame-pointer

2018-03-12 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84823

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #1 from Arseny Solokha  ---
Looks like a duplicate of PR78911?

[Bug target/33944] streaming 64-bit integer stores

2018-03-12 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33944

H.J. Lu  changed:

   What|Removed |Added

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

--- Comment #4 from H.J. Lu  ---
Fixed for 4.7.0.

[Bug c++/84808] [8 Regression] ICE with constexpr and array

2018-03-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84808

Jakub Jelinek  changed:

   What|Removed |Added

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

[Bug middle-end/84831] New: Invalid memory read in parse_output_constraint

2018-03-12 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84831

Bug ID: 84831
   Summary: Invalid memory read in parse_output_constraint
   Product: gcc
   Version: 8.0.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hjl.tools at gmail dot com
  Target Milestone: ---

parse_output_constraint has

  /* Loop through the constraint string.  */
  for (p = constraint + 1; *p; p += CONSTRAINT_LEN (*p, p))

#define CONSTRAINT_LEN(c_,s_) insn_constraint_len (c_,s_)

On x86, there are

static inline size_t
insn_constraint_len (char fc, const char *str ATTRIBUTE_UNUSED)
{
  switch (fc)
{   
case 'B': return 2;
case 'T': return 2;
case 'W': return 2;
case 'Y': return 2;
default: break;
}   
  return 1;
}

For

  asm volatile ("" : "+T,Y" (b));

parse_output_constraint doesn't check if p += CONSTRAINT_LEN (*p, p)
is beyond the end of string.

[Bug c++/84808] [8 Regression] ICE with constexpr and array

2018-03-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84808

--- Comment #2 from Jakub Jelinek  ---
Created attachment 43629
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43629&action=edit
gcc8-pr84808.patch

Untested fix.

[Bug rtl-optimization/84753] GCC does not fold xxswapd followed by vperm

2018-03-12 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84753

--- Comment #8 from Bill Schmidt  ---
Looks like Peter was able to help you on the binutils forum over the weekend. 
Thanks, Peter!

[Bug c++/84804] [8 Regression] ICE with lambda in default argument

2018-03-12 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84804

Nathan Sidwell  changed:

   What|Removed |Added

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

[Bug c++/84812] [8 Regression] ICE with local function

2018-03-12 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84812

Nathan Sidwell  changed:

   What|Removed |Added

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

[Bug middle-end/84831] Invalid memory read in parse_output_constraint

2018-03-12 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84831

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-03-12
 Ever confirmed|0   |1

--- Comment #1 from H.J. Lu  ---
I am testing this:

diff --git a/gcc/stmt.c b/gcc/stmt.c
index 457fe7f6f78..3a3ff40b682 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -222,11 +222,12 @@ parse_output_constraint (const char **constraint_p, int
op
erand_num,
  from and written to.  */
   *is_inout = (*p == '+');

+  size_t c_len = strlen (constraint);
+
   /* Canonicalize the output constraint so that it begins with `='.  */
   if (p != constraint || *is_inout)
 {
   char *buf;
-  size_t c_len = strlen (constraint);

   if (p != constraint)
warning (0, "output constraint %qc for operand %d "
@@ -247,7 +248,10 @@ parse_output_constraint (const char **constraint_p, int
ope
rand_num,
 }

   /* Loop through the constraint string.  */
-  for (p = constraint + 1; *p; p += CONSTRAINT_LEN (*p, p))
+  const char *constraint_end = constraint + c_len;
+  for (p = constraint + 1;
+   p <= constraint_end && *p;
+   p += CONSTRAINT_LEN (*p, p))
 switch (*p)
   {
   case '+':

[Bug lto/84805] [8 Regression] ICE in get_odr_type, at ipa-devirt.c:2096 since r258133

2018-03-12 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84805

--- Comment #6 from Eric Botcazou  ---
We have an ordering issue because of forward declarations:

class XclImpRoot : XclRoot {};
class XclImpColRowSettings : XclImpRoot {};

register_odr_type called on XclImpRoot causes get_odr_type to assign the id
number to XclImpColRowSettings before XclImpRoot because the base class:

class XclRoot {
public:
  virtual ~XclRoot();
  XclRootData &mrData;
};

has an XclRootData field which ultimately references:

struct RootData {
  BiffTyp eDateiTyp;
  ExtSheetBuffer *pExtSheetBuff;
  SharedFormulaBuffer *pShrfmlaBuff;
  ExtNameBuff *pExtNameBuff;
  ExcelToSc *pFmlaConverter;
  XclImpColRowSettings *pColRowBuff;
};

which contains a pointer to XclImpColRowSettings.

[Bug middle-end/84831] Invalid memory read in parse_output_constraint

2018-03-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84831

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #2 from Jakub Jelinek  ---
That is not efficient and is insufficient.  I'll handle this.

[Bug tree-optimization/84811] ICE on valid code at -O3 in 64-bit mode on x86_64-linux-gnu: in smallest_mode_for_size, at stor-layout.c:355

2018-03-12 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84811

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2018-03-12
 Ever confirmed|0   |1

--- Comment #2 from Martin Liška  ---
I also can't reproduce that.

[Bug middle-end/84831] Invalid memory read in parse_output_constraint

2018-03-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84831

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

Untested fix (large only because of the reindentation).

[Bug tree-optimization/84803] [8 Regression] ICE from ifcvt_memrefs_wont_trap with -O3

2018-03-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84803

--- Comment #6 from Richard Biener  ---
Author: rguenth
Date: Mon Mar 12 12:32:28 2018
New Revision: 258446

URL: https://gcc.gnu.org/viewcvs?rev=258446&root=gcc&view=rev
Log:
2018-03-12  Richard Biener  

PR tree-optimization/84803
* tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
for refs DR analysis didn't process.

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

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr84803.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-if-conv.c

[Bug tree-optimization/84803] [8 Regression] ICE from ifcvt_memrefs_wont_trap with -O3

2018-03-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84803

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug middle-end/84831] Invalid memory read in parse_output_constraint

2018-03-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84831

--- Comment #4 from Jakub Jelinek  ---
diff -upbd of that for better readability.

--- gcc/stmt.c.jj   2018-01-03 10:19:55.150533956 +0100
+++ gcc/stmt.c  2018-03-12 13:25:03.790733765 +0100
@@ -247,7 +247,8 @@ parse_output_constraint (const char **co
 }

   /* Loop through the constraint string.  */
-  for (p = constraint + 1; *p; p += CONSTRAINT_LEN (*p, p))
+  for (p = constraint + 1; *p; )
+{
 switch (*p)
   {
   case '+':
@@ -304,6 +305,11 @@ parse_output_constraint (const char **co
break;
   }

+  for (size_t len = CONSTRAINT_LEN (*p, p); len; len--, p++)
+   if (*p == '\0')
+ break;
+}
+
   return true;
 }


Note, I was wrong about insufficient, your patch was sufficient, I was
initially also changing parse_input_constraint but it turned out to be
unnecessary.

[Bug middle-end/84831] Invalid memory read in parse_output_constraint

2018-03-12 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84831

--- Comment #5 from H.J. Lu  ---
(In reply to Jakub Jelinek from comment #4)
> diff -upbd of that for better readability.
> 
> --- gcc/stmt.c.jj 2018-01-03 10:19:55.150533956 +0100
> +++ gcc/stmt.c2018-03-12 13:25:03.790733765 +0100
> @@ -247,7 +247,8 @@ parse_output_constraint (const char **co
>  }
>  
>/* Loop through the constraint string.  */
> -  for (p = constraint + 1; *p; p += CONSTRAINT_LEN (*p, p))
> +  for (p = constraint + 1; *p; )
> +{
>  switch (*p)
>{
>case '+':
> @@ -304,6 +305,11 @@ parse_output_constraint (const char **co
>   break;
>}
>  
> +  for (size_t len = CONSTRAINT_LEN (*p, p); len; len--, p++)
> + if (*p == '\0')
> +   break;
> +}
> +
>return true;
>  }
>  
> 

Both patches should work.  I have no preference.  Thanks.

[Bug c++/84801] [8 Regression] ICE: Segmentation fault instead of "error: parameter packs not expanded with '...'"

2018-03-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84801

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P3  |P1
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-03-12
 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org
   Target Milestone|--- |8.0
Summary|ICE: Segmentation fault |[8 Regression] ICE:
   |instead of "error:  |Segmentation fault instead
   |parameter packs not |of "error: parameter packs
   |expanded with '...'"|not expanded with '...'"
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
Started with r251433.

[Bug target/84799] ICE on valid code at -O1: in lra_split_hard_reg_for, at lra-assigns.c:1802

2018-03-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84799

--- Comment #3 from Jakub Jelinek  ---
That patch has been reverted in r258415.

[Bug c++/84802] [8 Regression] ICE in gimplify_decl_expr since r251433

2018-03-12 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84802

--- Comment #2 from Jason Merrill  ---
Author: jason
Date: Mon Mar 12 12:58:38 2018
New Revision: 258447

URL: https://gcc.gnu.org/viewcvs?rev=258447&root=gcc&view=rev
Log:
PR c++/84802 - ICE capturing uninstantiated class.

* lambda.c (build_capture_proxy): Call complete_type.

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

[Bug c++/84798] ICE (Segmentation fault) if `auto` appears in a template argument

2018-03-12 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84798

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-03-12
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

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

[Bug c++/84798] ICE (Segmentation fault) if `auto` appears in a template argument

2018-03-12 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84798

--- Comment #2 from Marek Polacek  ---
Started with r202540.  Before that:

error: parameter declared ‘auto’
 constexpr auto x = S::value;
  ^

[Bug tree-optimization/81740] [6/7/8 Regression] wrong code at -O3 in both 32-bit and 64-bit modes on x86_64-linux-gnu

2018-03-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81740

--- Comment #6 from Richard Biener  ---
Eventually PR60276 is related for which I introduced STMT_VINFO_MIN_NEG_DIST
which is checked just by vectorizable_load (vectorizable_store didn't support
negative distances at the time).  One part says

  /* Invalidate assumptions made by dependence analysis when vectorization
 on the unrolled body effectively re-orders stmts.  */
  if (ncopies > 1
...

that suggests the issue is related given for outer loop vectorization we
unroll the inner loop.  It also suggests a testcase for the store case
with just inner loop vectorization might be possible.

I never liked this post-fact throwing away of the dependence analysis
result so a fix to dependence analysis should eventually also fix the
PR60276 issue, removing the need for STMT_VINFO_MIN_NEG_DIST.

The dependence checking loop over distance vectors just looks at the
distance for the outer loop.

[Bug c++/84795] Explicit specialization of constexpr static data member incorrectly rejected in C++17

2018-03-12 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84795

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-03-12
 Ever confirmed|0   |1

[Bug c++/84798] [6/7/8 Regression] ICE (Segmentation fault) if `auto` appears in a template argument

2018-03-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84798

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P3  |P2
 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org
   Target Milestone|--- |6.5
Summary|ICE (Segmentation fault) if |[6/7/8 Regression] ICE
   |`auto` appears in a |(Segmentation fault) if
   |template argument   |`auto` appears in a
   ||template argument

--- Comment #3 from Jakub Jelinek  ---
Is auto valid among parameters except for generic lambdas?

[Bug c++/84792] [6/7/8 Regression] ICE with broken typedef of a struct

2018-03-12 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84792

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-03-12
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

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

[Bug target/84799] ICE on valid code at -O1: in lra_split_hard_reg_for, at lra-assigns.c:1802

2018-03-12 Thread hjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84799

--- Comment #4 from hjl at gcc dot gnu.org  ---
Author: hjl
Date: Mon Mar 12 13:32:44 2018
New Revision: 258448

URL: https://gcc.gnu.org/viewcvs?rev=258448&root=gcc&view=rev
Log:
Add a testcase for PR 84799

This was introduced by r258390 and fixed by r258415.

* gcc.dg/pr84799.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/pr84799.c
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug c++/84792] [6/7/8 Regression] ICE with broken typedef of a struct

2018-03-12 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84792

--- Comment #2 from Marek Polacek  ---
Started with r208157.

[Bug other/84821] [8 Regression] ICE (unable to find a register to spill)

2018-03-12 Thread hjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84821

--- Comment #3 from hjl at gcc dot gnu.org  ---
Author: hjl
Date: Mon Mar 12 13:33:38 2018
New Revision: 258449

URL: https://gcc.gnu.org/viewcvs?rev=258449&root=gcc&view=rev
Log:
Add a testcase for PR 84821

This was introduced by r258390 and fixed by r258415.

* g++.dg/pr84821.C: New test.

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

[Bug other/84821] [8 Regression] ICE (unable to find a register to spill)

2018-03-12 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84821

H.J. Lu  changed:

   What|Removed |Added

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

--- Comment #4 from H.J. Lu  ---
Fixed.

[Bug target/84799] ICE on valid code at -O1: in lra_split_hard_reg_for, at lra-assigns.c:1802

2018-03-12 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84799

H.J. Lu  changed:

   What|Removed |Added

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

--- Comment #5 from H.J. Lu  ---
Fixed.

[Bug c++/33979] support for char16_t, char32_t

2018-03-12 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33979

--- Comment #20 from Jonathan Wakely  ---
Compiler support for char16_t and char32_t has been complete for many years.

The libstdc++ support required by the standard has been complete since GCC 5.1,
but I don't know if Paolo had more in mind (we don't implement all locale
facets for char16_t and char32_t, which means e.g.
std::basic_stringstream doesn't work, but the standard doesn't
require it to work).

[Bug c++/84798] [6/7/8 Regression] ICE (Segmentation fault) if `auto` appears in a template argument

2018-03-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84798

--- Comment #4 from Jakub Jelinek  ---
Outside of lambdas the patch essentially changed an error diagnostic to
else if (cxx_dialect < cxx1y)
  pedwarn (location_of (type), 0,
  "use of % in parameter declaration "
  "only available with "
  "-std=c++1y or -std=gnu++1y");
   else
 pedwarn (location_of (type), OPT_Wpedantic,
  "ISO C++ forbids use of % in parameter "
  "declaration");
Do we really want that extension and what uses it?

[Bug tree-optimization/84485] [6/7 Regression] Vectorising zero-stride rmw operation

2018-03-12 Thread rsandifo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84485

--- Comment #3 from rsandifo at gcc dot gnu.org  
---
Author: rsandifo
Date: Mon Mar 12 13:50:52 2018
New Revision: 258450

URL: https://gcc.gnu.org/viewcvs?rev=258450&root=gcc&view=rev
Log:
Don't vectorise zero-step rmw operations (PR 84485)

GCC 6 and 7 would vectorise:

void
f (unsigned long incx, unsigned long incy,
   float *restrict dx, float *restrict dy)
{
  unsigned long ix = 0, iy = 0;
  for (unsigned long i = 0; i < 512; ++i)
{
  dy[iy] += dx[ix];
  ix += incx;
  iy += incy;
}
}

without first proving that incy is nonzero.  This is a regression from
GCC 5.  It was fixed on trunk in r256644, which versioned the loop based
on whether incy is zero, but that's obviously too invasive to backport.
This patch instead bails out for possibly-zero steps in the place that
trunk would try a check for zeroness.

Also, the patch makes vect_analyze_data_ref_access check safelen
as well as force_vectorize.

2018-03-12  Richard Sandiford  

gcc/
PR tree-optimization/84485
* tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Return
true for zero dependence distances if the step might be zero,
and if there is no metadata that guarantees correctness.
(vect_analyze_data_ref_access): Check safelen as well as
force_vectorize.

gcc/testsuite/
PR tree-optimization/84485
* gcc.dg/vect/pr84485.c: New test.

Added:
branches/gcc-7-branch/gcc/testsuite/gcc.dg/vect/pr84485.c
Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/testsuite/ChangeLog
branches/gcc-7-branch/gcc/tree-vect-data-refs.c

[Bug tree-optimization/84485] [6 Regression] Vectorising zero-stride rmw operation

2018-03-12 Thread rsandifo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84485

rsandifo at gcc dot gnu.org  changed:

   What|Removed |Added

Summary|[6/7 Regression]|[6 Regression] Vectorising
   |Vectorising zero-stride rmw |zero-stride rmw operation
   |operation   |

--- Comment #4 from rsandifo at gcc dot gnu.org  
---
Applied to GCC 7 so far.

[Bug c++/84676] [6/7/8 Regression] internal compiler error: Segmentation fault (build_new_op_1)

2018-03-12 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84676

Marek Polacek  changed:

   What|Removed |Added

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

[Bug rtl-optimization/84780] [8 Regression] wrong code aarch64 with -O3 --param=tree-reassoc-width=32

2018-03-12 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84780

Segher Boessenkool  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |segher at gcc dot 
gnu.org

--- Comment #8 from Segher Boessenkool  ---
Created attachment 43631
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43631&action=edit
proposed patch

I cannot reproduce that exact generated code; maybe it needs tuning for some
particular CPU?

Could you try the attached patch?  Thanks!

[Bug target/84828] ICE in verify_flow_info at gcc/cfghooks.c:265

2018-03-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84828

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-03-12
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
Created attachment 43632
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43632&action=edit
gcc8-pr84828.patch

Untested fix.

[Bug rtl-optimization/84806] [8 Regression] r258390 caused internal compiler error

2018-03-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84806

Jakub Jelinek  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 CC||jakub at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #2 from Jakub Jelinek  ---
If it started with r258390, then it must have been fixed by r258415 which was
reversion thereof.

[Bug c++/84820] [6/7/8 Regression] Bogus pointer-to-member accepted within template

2018-03-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84820

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P3  |P2
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-03-12
 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
Started with r208332.

[Bug c++/84802] [8 Regression] ICE in gimplify_decl_expr since r251433

2018-03-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84802

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #3 from Jakub Jelinek  ---
Fixed, thanks.

[Bug rtl-optimization/84780] [8 Regression] wrong code aarch64 with -O3 --param=tree-reassoc-width=32

2018-03-12 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84780

--- Comment #9 from Zdenek Sojka  ---
(In reply to Segher Boessenkool from comment #8)
> Created attachment 43631 [details]
> proposed patch
> 
> I cannot reproduce that exact generated code; maybe it needs tuning for some
> particular CPU?
> 
> Could you try the attached patch?  Thanks!

I can confirm that r258444 FAILs, but r258449+patch PASSes the testcases (both
original and reduced).

[Bug c++/84355] [7/8 Regression] ICE with failing template argument deduction

2018-03-12 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84355

--- Comment #3 from Jason Merrill  ---
Author: jason
Date: Mon Mar 12 14:40:45 2018
New Revision: 258451

URL: https://gcc.gnu.org/viewcvs?rev=258451&root=gcc&view=rev
Log:
PR c++/84355 - ICE with deduction for member class template.

* pt.c (tsubst) [TEMPLATE_TYPE_PARM]: Always substitute into
CLASS_PLACEHOLDER_TEMPLATE.

Added:
trunk/gcc/testsuite/g++.dg/cpp1z/class-deduction50.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c

[Bug target/84827] [7/8 Regression] ICE in extract_insn, at recog.c:2311

2018-03-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84827

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-03-12
 CC||jakub at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
Reduced testcase:

/* PR 84827 */
/* { dg-do compile } */
/* { dg-options "-Ofast -fno-fp-int-builtin-inexact -ftrapping-math
-fno-associative-math" } */

long double
foo (long double a)
{
  return __builtin_roundl (a);
}

[Bug target/45616] internal compiler error: in note_invalid_constants, at config/arm/arm.c:11243

2018-03-12 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45616

Eric Gallager  changed:

   What|Removed |Added

   Keywords||error-recovery
 Status|NEW |RESOLVED
 CC||egallager at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #7 from Eric Gallager  ---
(In reply to Ian Bolton from comment #6)
> Technically, this is ICE on invalid code, but a more user-friendly error
> would be better.  As it happens, one has been added to trunk, as of 16th
> June.
> 
> http://gcc.gnu.org/ml/gcc-patches/2010-06/msg01501.html
> 
> I will backport it to 4.5, unless Mr Brook wants to.

4.5 branch is closed, so a backport is unnecessary. Closing as FIXED.

[Bug c++/84832] New: Base class member function incorrectly introduced by using-declarator

2018-03-12 Thread jaak at ristioja dot ee
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84832

Bug ID: 84832
   Summary: Base class member function incorrectly introduced by
using-declarator
   Product: gcc
   Version: 7.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jaak at ristioja dot ee
  Target Milestone: ---

struct Base {
template 
void f(T &&) const {}
};

struct Derived: Base {
template 
void f(T &&) const {}

using Base::f;
};

int main() {
Derived const cd;
cd.f('x');
}

The following compiles fine with GCC and -std=c++11, but not with Clang. User
liliscent over at https://stackoverflow.com/q/49235124/3919155 thinks this is a
GCC bug, because Base::f should not be introduced by the using-declarator
because of [namespace.udecl]:

> When a using-declarator brings declarations from a
> base class into a derived class, member functions
> and member function templates in the derived class
> override and/or hide member functions and member
> function templates with the same name, parameter-
> type-list, cv-qualification, and ref-qualifier (if
> any) in a base class (rather than conflicting).
> Such hidden or overridden declarations are excluded
> from the set of declarations introduced by the
> using-declarator.

[Bug target/84829] -mieee-fp causes to link with -lieee but that is no longer available

2018-03-12 Thread matz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84829

Michael Matz  changed:

   What|Removed |Added

 CC||matz at gcc dot gnu.org

--- Comment #1 from Michael Matz  ---
Note that the old libieee.a (which was only an object) set the global variable
_LIB_VERSION to _IEEE_.  That variable is (or was) checked by various libm
routines to conditionalize behaviour in error cases, which is the purpose of
-mieee-fp.  So that's what warranted the inclusion of -lieee in the past.

The change removing libieee from glibc also removed all handling of that global
variable, so the right thing to do for gcc is to not link against it if it
doesn't exist.  Which is of course a problem, as then you can't update glibc
without having to rebuild gcc :-/

[Bug target/84829] -mieee-fp causes to link with -lieee but that is no longer available

2018-03-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84829

--- Comment #2 from Jakub Jelinek  ---
I'd say the right thing is to keep libieee.a around, even if it will be an
empty ar archive.

GCC is not the linker and doesn't have the library search logic the linker has,
so it is hard to add -lieee for -mieee-fp only if it exists and not otherwise.

  1   2   >