[Bug c++/79782] [7 Regression] ICE: tree check: expected tree_list, have void_type in emit_mem_initializers, at cp/init.c:1225

2017-03-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79782

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P1

[Bug c++/79781] ICE on valid C++ code with -std=c++14 (in assemble_integer, at varasm.c:2733)

2017-03-01 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79781

--- Comment #4 from Marek Polacek  ---
With -std=c++0x GCC 4.6 says

const-init.cpp:33:29: error: ‘constexpr’ needed for in-class initialization of
static data member ‘d’ of non-integral type
const-init.cpp:34:28: error: ‘d’ was not declared in this scope
const-init.cpp:34:32: error: ‘constexpr’ needed for in-class initialization of
static data member ‘f’ of non-integral type
const-init.cpp:46:15: error: ‘d’ is not a member of ‘test2::A’
const-init.cpp:47:19: error: ‘d’ is not a member of ‘test2::A’
const-init.cpp:47:25: error: ‘f’ is not a member of ‘test2::A’
const-init.cpp:48:25: error: ‘struct test2::A’ has no member named ‘d’

and GCC 4.7:
const-init.cpp:91:17: internal compiler error: in assemble_integer, at
varasm.c:2552

[Bug sanitizer/79783] [7 Regression] ICE on valid C++ with -fsanitize=address

2017-03-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79783

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P1

[Bug c++/79781] ICE on valid C++ code with -std=c++14 (in assemble_integer, at varasm.c:2733)

2017-03-01 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79781

Marek Polacek  changed:

   What|Removed |Added

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

--- Comment #3 from Marek Polacek  ---
Probably started with r180707.

[Bug c++/79782] [7 Regression] ICE: tree check: expected tree_list, have void_type in emit_mem_initializers, at cp/init.c:1225

2017-03-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79782

Jakub Jelinek  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org
   Target Milestone|--- |7.0

[Bug sanitizer/79783] [7 Regression] ICE on valid C++ with -fsanitize=address

2017-03-01 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79783

Martin Liška  changed:

   What|Removed |Added

   Last reconfirmed||2017-3-1
   Assignee|unassigned at gcc dot gnu.org  |marxin at gcc dot 
gnu.org
   Target Milestone|--- |7.0

[Bug sanitizer/79783] New: [7 Regression] ICE on valid C++ with -fsanitize=address

2017-03-01 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79783

Bug ID: 79783
   Summary: [7 Regression] ICE on valid C++ with
-fsanitize=address
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: sanitizer
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
jakub at gcc dot gnu.org, kcc at gcc dot gnu.org
  Target Milestone: ---

Ok, after creating many issues for others, I've just found one mine:

$ cat ~/Programming/testcases/ice.C
struct a
{
  static void
  b (const char &)
  {
  }
};
class c
{
  struct C
  {
C (char);
  } e;

public:
  c () : e (0) { a::b (char()); }
};
template  class f
{
  virtual d h () const;
};
template 
d
f::h () const
{
  c g;
}
main () { f i; }

./xg++ -B. -O2 -fsanitize=address -c -fno-tree-dce
~/Programming/testcases/ice.C -c
/home/marxin/Programming/testcases/ice.C: In member function ‘d f::h() const
[with d = int]’:
/home/marxin/Programming/testcases/ice.C:24:1: internal compiler error:
Segmentation fault
 f::h () const
 ^~~~
0x11c crash_signal
../../gcc/toplev.c:337
0x1524b0b copy_node_stat(tree_node*)
../../gcc/tree.c:1136
0x11f3dc4 create_asan_shadow_var
../../gcc/asan.c:3082
0x11f3fa9 asan_expand_poison_ifn(gimple_stmt_iterator*, bool*,
hash_map, tree_node*> >&)
../../gcc/asan.c:3116
0x12074f1 execute
../../gcc/sanopt.c:939

[Bug target/79395] Compile error with -mcpu=power9 and __builtin_vec_vcmpne_p

2017-03-01 Thread kelvin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79395

--- Comment #3 from kelvin at gcc dot gnu.org ---
Author: kelvin
Date: Wed Mar  1 14:43:02 2017
New Revision: 245811

URL: https://gcc.gnu.org/viewcvs?rev=245811=gcc=rev
Log:
gcc/ChangeLog:

2017-03-01  Kelvin Nilsen  

PR target/79395
* config/rs6000/altivec.h (vec_ctz and others): Change the
preprocessor macro that controls conditional compilation from
_ARCH_PWR9 to __POWER9_VECTOR__.
(vec_all_ne): Change parameterization of __altivec_scalar_pred
macro expansion under preprocessor #ifdef __POWER9_VECTOR__
control (instead of _ARCH_PWR9 control) so that template
definition uses power9-specific function.
(vec_any_eq): Likewise.
(vec_all_ne): Change macro definition to use a power9-specific
expansion under #ifdef __POWER9_VECTOR__ control (instead of
_ARCH_PWR9 control).
(vec_any_eq) Likewise.
* config/rs6000/rs6000-builtin.def (CMPNEF): Remove BU_P9V_AV_2
expansion for CMPNEF to remove support for xvcmpnesp instruction.
(CMPNED): Remove BU_P9V_AV2 expansion for CMPNED to remove
support for xvcmpnedp instruction.
(VCMPNEB_P): Replace BU_P9V_AV_P macro expansion with BU_P9V_AV_2
macro expansion so that Power9 implementation of vec_all_ne does
not use the AltiVec predicate framework.
(VCMPNEH_P): Likewise.
(VCMPNEW_P): Likewise.
(VCMPNED_P): Likewise.
(VCMPNEFP_P): Likewise.
(VCMPNEDP_P): Likewise.
(VCMPAEB_P): Add BU_P9V_AV_2 macro expansion to change
implementation of vec_any_eq to not use AltiVec predicate
framework.
(VCMPAEH_P): Likewise.
(VCMPAEW_P): Likewise.
(VCMPAED_P): Likewise.
(VCMPAEFP_P): Likewise.
(VCMPAEDP_P): Likewise.
(VCMPNE_P): Replace BU_P9V_OVERLOAD_P macro expansion with
BU_P9V_OVERLOAD_2 so that Power9 implementation of vec_all_ne does
not use the AltiVec predicate framework.
(VCMPAE_P): Add BU_P9V_OVERLOAD_2 macro to change implementation
of vec_any_eq to not use AltiVec predicate framework.
* config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Add
support for predefined __POWER9_VECTOR__ macro to indicate that
Power9 instruction selection is enabled.
(altivec_overloaded_builtins): Remove extraneous
ALTIVEC_BUILTIN_VEC_CMPNE entry for overloaded
function argument types RS6000_BTI_bool_V16QI and
RS6000_BTI_bool_V16QI.  Remove erroneous ALTIVEC_BUILTIN_VEC_CMPNE
entry for overloaded function argument types RS6000_BTI_bool_V4SI
andRS6000_BTI_bool_V4SI, mapping to P9V_BUILTIN_CMPNEB.  Remove
two entries mapping to P9V_BUITIN_CMPNED and one entry mapping to
P9V_BUILTIN_CMPNEF to force use of instructions not specific to
Power9 for implementations of vec_cmpne.  Change the signature for
all definitions of the overloaded P9V_BUILTIN_VEC_CMPNE_P function
(representing vec_all_ne) to remove the previously described first
argument of type RS6000_BTI_INTSI, as this was an artifact of
reliance on the AltiVec predicate framework, which is no longer
used in the implementation of these functions.  Add
P9V_BUILTIN_VEC_VCMPAE_P entries (representing the vec_anyeq
function) to match all of the P9V_BUILTIN_VEC_VCMNE_P entries
since, unlike the AltiVec predicate framework implementation, we
do not share function descriptors between vec_alle and vec_anyeq.
(altivec_resolve_overloaded_builtin): Add SFmode and DFmode to the
set of modes that receive special treatment even when
TARGET_P9_VECTOR is true.  The special treatment emits code that
does not depend on Power9 instructions.
* config/rs6000/vector.md (vector_ne__p): Change this
define_expand to not rely on AltiVec predicate framework.
(vector_ae_p): New define_expand to represent vec_any_eq
function.
(vector_ne_v2di_p): Change this define_expand to not rely on
AltiVec predicate framework.
(vector_ae_v2di_p): New define_expand to represent vec_any_eq
function.
(vector_ne__p): Change this define_expand to not rely on
AltiVec predicate framework.
(vector_ae_p): New define_expand to represent vec_any_eq
function.
* config/rs6000/vsx.md (*vsx_ne__p): For modes VSX_EXTRACT_I
(V16QI, V8HI, V4SI), correct a typo in the code emitted for this
define_insn pattern.
(*vsx_ne__p): For modes VSX_F (V4SF and V2DF), remove this
define_insn pattern because the xvcmpne. instruction is not
supported.
(vcmpne): Remove this define_insn because xvcmpne
instruction is not supported.

gcc/testsuite/ChangeLog:

2017-03-01  Kelvin Nilsen  

[Bug tree-optimization/79622] [6/7 Regression] Wrong code w/ -O2 -floop-nest-optimize

2017-03-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79622

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P2  |P4
 CC||jakub at gcc dot gnu.org

[Bug c++/79782] New: [7 Regression] ICE: tree check: expected tree_list, have void_type in emit_mem_initializers, at cp/init.c:1225

2017-03-01 Thread burnus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79782

Bug ID: 79782
   Summary: [7 Regression] ICE: tree check: expected tree_list,
have void_type in emit_mem_initializers, at
cp/init.c:1225
   Product: gcc
   Version: 7.0.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: burnus at gcc dot gnu.org
  Target Milestone: ---

Created attachment 40862
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40862=edit
C++ example, run as "g++ test.ii"

Worked yesterday or so.

Attached example fails with compiling (g++ test.ii) as:
test.ii: In constructor ‘std::MutableNumericType::MutableNumericType(const
string&)’:
test.ii:22:45: internal compiler error: tree check: expected tree_list, have
void_type in emit_mem_initializers, at cp/init.c:1225
 typeName):MutableNumericTaggedType ()
 ^
0x100dd0c tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../gcc/tree.c:9813
0x7944b1 tree_check(tree_node*, char const*, int, char const*, tree_code)
../../gcc/tree.h:3064
0x7944b1 emit_mem_initializers(tree_node*)
../../gcc/cp/init.c:1225
0x726f8a cp_parser_mem_initializer_list
../../gcc/cp/parser.c:14116
0x726f8a cp_parser_ctor_initializer_opt
../../gcc/cp/parser.c:14027

[Bug rtl-optimization/79779] [5/6/7 Regression] ICE on an invalid code with -fsanitize=undefined

2017-03-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79779

Richard Biener  changed:

   What|Removed |Added

   Keywords||ra
   Priority|P3  |P2
   Target Milestone|--- |5.5

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

2017-03-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79780

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |7.0

[Bug middle-end/79753] [7 Regression][CHKP] ICE in ix86_expand_builtin, at config/i386/i386.c:36869

2017-03-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79753

--- Comment #4 from Jakub Jelinek  ---
Simplified testcase:

int
foo (void)
{
  return 0;
}

void
bar (int **p)
{
  *p = (int *) (__UINTPTR_TYPE__) foo ();
}

Now, if foo returns int *, then the bndret is transformed during inlining into
__chkp_none_bounds, but not when it is not a pointer.

[Bug middle-end/79753] [7 Regression][CHKP] ICE in ix86_expand_builtin, at config/i386/i386.c:36869

2017-03-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79753

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek  ---
The function returns int and that is then cast to ssize_t and then to a
pointer.
Assuming the int is a valid pointer doesn't look right.
Though, perhaps even if there is just function returning pointer and it returns
NULL it might be similar.

[Bug lto/79579] [5/6 Regression] ICE in ipa_write_node_info (ipa-prop.c:4931)

2017-03-01 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79579

Martin Jambor  changed:

   What|Removed |Added

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

--- Comment #5 from Martin Jambor  ---
Fixed.

[Bug c++/79781] ICE on valid C++ code with -std=c++14 (in assemble_integer, at varasm.c:2733)

2017-03-01 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79781

--- Comment #2 from Martin Liška  ---
There's back-trace coming from trunk:

g++ const-init.cpp -std=c++14 -c
const-init.cpp:91:17: internal compiler error: in assemble_integer, at
varasm.c:2754
 X x = {(long)};
 ^
0x1550515 assemble_integer(rtx_def*, unsigned int, unsigned int, int)
../../gcc/varasm.c:2754
0x1557347 output_constant
../../gcc/varasm.c:4804
0x154e841 assemble_variable_contents
../../gcc/varasm.c:2083
0x154f2a1 assemble_variable(tree_node*, int, int, int)
../../gcc/varasm.c:2259
0x1566fb0 varpool_node::assemble_decl()
../../gcc/varpool.c:588
0xc414c8 output_in_order
../../gcc/cgraphunit.c:2285
0xc41b95 symbol_table::compile()
../../gcc/cgraphunit.c:2525
0xc41dea symbol_table::finalize_compilation_unit()
../../gcc/cgraphunit.c:2621

[Bug tree-optimization/79737] [7 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu (in both 32-bit and 64-bit modes)

2017-03-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79737

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug lto/79579] [5/6 Regression] ICE in ipa_write_node_info (ipa-prop.c:4931)

2017-03-01 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79579

--- Comment #4 from Martin Jambor  ---
Author: jamborm
Date: Wed Mar  1 13:54:56 2017
New Revision: 245810

URL: https://gcc.gnu.org/viewcvs?rev=245810=gcc=rev
Log:
[PR 79579] Avoid segfault on NULL ipa_edge_args_vector

2017-03-01  Martin Jambor  

Backport from mainline
2017-02-21  Martin Jambor  

PR lto/79579
* ipa-prop.c (ipa_prop_write_jump_functions): Bail out if no edges
have been analyzed.


Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/ipa-prop.c

[Bug c++/79781] ICE on valid C++ code with -std=c++14 (in assemble_integer, at varasm.c:2733)

2017-03-01 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79781

--- Comment #1 from Martin Liška  ---
Created attachment 40861
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40861=edit
test-case

[Bug c++/79781] New: ICE on valid C++ code with -std=c++14 (in assemble_integer, at varasm.c:2733)

2017-03-01 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79781

Bug ID: 79781
   Summary: ICE on valid C++ code with -std=c++14 (in
assemble_integer, at varasm.c:2733)
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  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: ---

We do ICE on a LLVM test-case:

g++ const-init.cpp -std=c++14
const-init.cpp:91:17: internal compiler error: in assemble_integer, at
varasm.c:2733
 X x = {(long)};
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

Looks clang++ accepts the code.

[Bug ipa/79764] [7 Regression][CHKP] ICE in chkp_make_addressed_object_bounds: Unexpected tree code bit_field_ref in tree-chkp.c:3528

2017-03-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79764

--- Comment #5 from Jakub Jelinek  ---
Maybe before BIT_FIELD_REF would never appear as something ADDR_EXPR is applied
to (when used only for normal bitfields, one can't take their addresses), but
here we end up with _FIELD_REF ymm, 32, 32>.

[Bug lto/79579] [5/6 Regression] ICE in ipa_write_node_info (ipa-prop.c:4931)

2017-03-01 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79579

--- Comment #3 from Martin Jambor  ---
Author: jamborm
Date: Wed Mar  1 13:53:33 2017
New Revision: 245809

URL: https://gcc.gnu.org/viewcvs?rev=245809=gcc=rev
Log:
[PR 79579] Avoid segfault on NULL ipa_edge_args_vector

2017-03-01  Martin Jambor  

Backport from mainline
2017-02-21  Martin Jambor  

PR lto/79579
* ipa-prop.c (ipa_prop_write_jump_functions): Bail out if no edges
have been analyzed.


Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/ipa-prop.c

[Bug ipa/79764] [7 Regression][CHKP] ICE in chkp_make_addressed_object_bounds: Unexpected tree code bit_field_ref in tree-chkp.c:3528

2017-03-01 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79764

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #4 from Martin Liška  ---
I'll take a look and also prepare clean-up patch to deal with these debugging
printing. Thanks Jakub for hint.

[Bug ipa/79764] [7 Regression][CHKP] ICE in chkp_make_addressed_object_bounds: Unexpected tree code bit_field_ref in tree-chkp.c:3528

2017-03-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79764

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek  ---
Seems BIT_FIELD_REF is already handled in chkp_process_stmt (and e.g.
TARGET_MEM_REF too), but not in the other routine.
Just noticed:
case ARRAY_RANGE_REF:
  printf("ARRAY_RANGE_REF\n");
  debug_gimple_stmt(gsi_stmt(*iter));
  debug_tree(node);
  gcc_unreachable ();
  break;
that really shouldn't have made through (wrong formatting, printing on stdout),
guess gcc_unreachable (); alone without break; afterwards would be more than
enough.

[Bug tree-optimization/79777] [7 Regression] ICE on -Os and above in on aarch64-linux-gnu (internal compiler error: in VN_INFO_GET, at tree-ssa-sccvn.c:407 })

2017-03-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79777

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P1
 Blocks||45397


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45397
[Bug 45397] [5/6 Regression] Issues with integer narrowing conversions

[Bug tree-optimization/79778] [7 regression] missed optimization causes linux kernel build failure since r245135

2017-03-01 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79778

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||trippels at gcc dot gnu.org
 Resolution|--- |DUPLICATE

--- Comment #3 from Markus Trippelsdorf  ---
It is a dup. See
https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1340546.html

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

[Bug tree-optimization/72785] [7 Regression] kernel build error since r236831

2017-03-01 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||arnd at linaro dot org

--- Comment #29 from Markus Trippelsdorf  ---
*** Bug 79778 has been marked as a duplicate of this bug. ***

[Bug middle-end/36770] PowerPC missed autoincrement opportunity

2017-03-01 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36770

Segher Boessenkool  changed:

   What|Removed |Added

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

--- Comment #8 from Segher Boessenkool  ---
Works fine on both GCC 6 and trunk; closing as fixed.

[Bug rtl-optimization/79571] [5/6/7 Regression] ICE in Max. number of generated reload insns per insn is achieved (90)

2017-03-01 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79571

--- Comment #6 from Uroš Bizjak  ---
(In reply to Jakub Jelinek from comment #5)
> We have:
> (insn 8 6 9 2 (set (reg:TI 93 [ *_2 ])
> (mem:TI (zero_extend:DI (reg:SI 91)) [1 *_2+0 S16 A64]))
> "pr79571.c":8 80 {*movti_internal}
>  (expr_list:REG_DEAD (reg:SI 91)
> (expr_list:REG_EQUIV (mem/c:TI (symbol_ref:DI ("a") [flags 0x2] 
> ) [1 a+0 S16 A64])
> (nil
> and the constraints/predicates are:
> (define_insn "*movti_internal"
>   [(set (match_operand:TI 0 "nonimmediate_operand" "=!r ,o ,v,v ,v ,m")
> (match_operand:TI 1 "general_operand"  "riFo,re,C,BC,vm,v"))]
> The (zero_extend:DI (reg:SI 91)) is valid address for nonimmediate_operand
> or m constraint, but not for o constraint, as it is not offsetable.  I'd
> have expected LRA to force the zero_extend into some DImode register and
> that would then be offsetable.  Or does the backend need to use a predicate
> like e.g. rs6000
> offsettable_mem_operand (in this case like nonimmediate_operand, but if it
> is a MEM, fail if not offsetable)?  That would in general pessimize the case
> where the source is in a vector register.

x86 has ix86_secondary_reload that should handle this situation.

[Bug rtl-optimization/79571] [5/6/7 Regression] ICE in Max. number of generated reload insns per insn is achieved (90)

2017-03-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79571

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-03-01
 Ever confirmed|0   |1

--- Comment #5 from Jakub Jelinek  ---
We have:
(insn 8 6 9 2 (set (reg:TI 93 [ *_2 ])
(mem:TI (zero_extend:DI (reg:SI 91)) [1 *_2+0 S16 A64])) "pr79571.c":8
80 {*movti_internal}
 (expr_list:REG_DEAD (reg:SI 91)
(expr_list:REG_EQUIV (mem/c:TI (symbol_ref:DI ("a") [flags 0x2] 
) [1 a+0 S16 A64])
(nil
and the constraints/predicates are:
(define_insn "*movti_internal"
  [(set (match_operand:TI 0 "nonimmediate_operand" "=!r ,o ,v,v ,v ,m")
(match_operand:TI 1 "general_operand"  "riFo,re,C,BC,vm,v"))]
The (zero_extend:DI (reg:SI 91)) is valid address for nonimmediate_operand or m
constraint, but not for o constraint, as it is not offsetable.  I'd have
expected LRA to force the zero_extend into some DImode register and that would
then be offsetable.  Or does the backend need to use a predicate like e.g.
rs6000
offsettable_mem_operand (in this case like nonimmediate_operand, but if it is a
MEM, fail if not offsetable)?  That would in general pessimize the case where
the source is in a vector register.

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

2017-03-01 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79780

Bug ID: 79780
   Summary: [7 Regression] ICE in rtl_verify_bb_insns, at
cfgrtl.c:2661 (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-alpha20170226 snapshot ICEs when compiling the following snippet
32-bit BE powerpc target at -O2:

int t3, iy, f4, oi, gn;

void
hr (long long int mh)
{
  int pi = 0;

  if (iy != 0)
for (;;)
  f4 = 0;

  if (t3 != 0)
{
  while (mh != 0LL)
{
  while (mh < 1LL)
++mh;
  ++mh;
}

  for (;;)
{
}

  for (oi = 0; oi < 1; ++oi)
  {
 n3:
;
  }

  gn = iy = 1;
}

  f4 = 0;

  if (pi - (mh != 0LL) == 0)
if (mh != 1LL)
  {
oi = t3 = 0;
if (mh == 0LL)
  ++pi;
  }

  if (iy != 0 && pi != 0)
{
  t3 = 0;
  goto n3;
}

  t3 /= 0;
}

% powerpc-e300c3-linux-gnu-gcc-7.0.0-alpha20170226 -O2 -w -c ojvp0vil.c 
ojvp0vil.c: In function 'hr':
ojvp0vil.c:51:1: error: in basic block 27:
 }
 ^
ojvp0vil.c:51:1: error: flow control insn inside a basic block
(insn 187 196 119 27 (trap_if (const_int 1 [0x1])
(const_int 0 [0])) 827 {trap}
 (nil))
ojvp0vil.c:51:1: internal compiler error: in rtl_verify_bb_insns, at
cfgrtl.c:2661
0x2b3b9aed015 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20170226/work/gcc-7-20170226/gcc/rtl-error.c:108
0x2b3b969fa87 rtl_verify_bb_insns
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20170226/work/gcc-7-20170226/gcc/cfgrtl.c:2661
0x2b3b969fa87 rtl_verify_flow_info_1
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20170226/work/gcc-7-20170226/gcc/cfgrtl.c:2747
0x2b3b968bbdd verify_flow_info()
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20170226/work/gcc-7-20170226/gcc/cfghooks.c:258
0x2b3b96a3737 checking_verify_flow_info
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20170226/work/gcc-7-20170226/gcc/cfghooks.h:198
0x2b3b96a3737 commit_edge_insertions()
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20170226/work/gcc-7-20170226/gcc/cfgrtl.c:2095
0x2b3ba20b02a bypass_conditional_jumps
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20170226/work/gcc-7-20170226/gcc/cprop.c:1741
0x2b3ba20b02a one_cprop_pass
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20170226/work/gcc-7-20170226/gcc/cprop.c:1878
0x2b3ba20b02a execute_rtl_cprop
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20170226/work/gcc-7-20170226/gcc/cprop.c:1922
0x2b3ba20b02a execute
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20170226/work/gcc-7-20170226/gcc/cprop.c:1960

[Bug tree-optimization/79778] [7 regression] missed optimization causes linux kernel build failure since r245135

2017-03-01 Thread arnd at linaro dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79778

--- Comment #2 from Arnd Bergmann  ---
(In reply to Richard Biener from comment #1)
> Dup of PR72785?

I thought we had worked around PR72785 in the kernel, and I had not run into
that problem until updating my gcc-7.0.1 snapshot yesterday. r245135, which
introduces the problem for me came after the last comment on PR72785.

[Bug rtl-optimization/79779] New: [5/6/7 Regression] ICE on an invalid code with -fsanitize=undefined

2017-03-01 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79779

Bug ID: 79779
   Summary: [5/6/7 Regression] ICE on an invalid code with
-fsanitize=undefined
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Keywords: ice-on-invalid-code
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
CC: polacek at redhat dot com, vmakarov at redhat dot com
  Target Milestone: ---
Target: x86_64-linux-gnu

Starting from r217947, we ICE on:

$ gcc /home/marxin/Programming/gcc/gcc/testsuite/gcc.target/m68k/pr45015.c
-o/dev/null -Og -fsanitize=undefined
/home/marxin/Programming/gcc/gcc/testsuite/gcc.target/m68k/pr45015.c: In
function ‘foo’:
/home/marxin/Programming/gcc/gcc/testsuite/gcc.target/m68k/pr45015.c:16:7:
error: ‘asm’ operand has impossible constraints
   __asm__ ("move.l %2, %0; move.l %3, %1" : "=d" (b), "=d" (c) : "g<>"
(y[j]), "d" (w));
   ^~~
/home/marxin/Programming/gcc/gcc/testsuite/gcc.target/m68k/pr45015.c:26:1:
internal compiler error: in lra_assign, at lra-assigns.c:1639
 }
 ^
0xd3281c lra_assign()
../../gcc/lra-assigns.c:1639
0xd2b9c9 lra(_IO_FILE*)
../../gcc/lra.c:2451
0xcd57ec do_reload
../../gcc/ira.c:5451
0xcd5c8c execute
../../gcc/ira.c:5635

[Bug rtl-optimization/79571] [5/6/7 Regression] ICE in Max. number of generated reload insns per insn is achieved (90)

2017-03-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79571

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek  ---
Cleaned up and further reduced testcase that still ICEs with -O2 -mno-sse:
struct A { int b; int *c; } a;
struct B { struct A *d; };

void
foo (unsigned int x)
{
  struct B b = (struct B) { (struct A *) (__UINTPTR_TYPE__) (x & ~3) };
  a = *b.d;
}

Might be even valid if say the caller makes sure to mmap the pointer in the
first 4GB and then casts to unsigned.

[Bug tree-optimization/79777] [7 Regression] ICE on -Os and above in on aarch64-linux-gnu (internal compiler error: in VN_INFO_GET, at tree-ssa-sccvn.c:407 })

2017-03-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79777

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-03-01
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
   Target Milestone|--- |7.0
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Confirmed, mine.

[Bug tree-optimization/79778] [7 regression] missed optimization causes linux kernel build failure since r245135

2017-03-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79778

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |7.0

--- Comment #1 from Richard Biener  ---
Dup of PR72785?

[Bug ipa/79776] [7 Regression][CHKP] ICE on valid code in insert_vi_for_tree, at tree-ssa-structalias.c:2807

2017-03-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79776

Richard Biener  changed:

   What|Removed |Added

 Target||x86_64-*-*, i?86-*-*
   Priority|P3  |P1
   Target Milestone|--- |7.0

[Bug tree-optimization/79778] New: [7 regression] missed optimization causes linux kernel build failure since r245135

2017-03-01 Thread arnd at linaro dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79778

Bug ID: 79778
   Summary: [7 regression] missed optimization causes linux kernel
build failure since r245135
   Product: gcc
   Version: 7.0.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: arnd at linaro dot org
  Target Milestone: ---

With the latest gcc-7.0.1 snapshot, I got lots of these failures building
random linux kernel configurations:

kernel/built-in.o: In function `update_wall_time':
(.text+0x418a0): undefined reference to `ilog2_NaN'

Variations of this symptom have happened in the past, e.g. pr36359, pr78653,
pr78879, pr49642, pr72785, but for all I can tell, this one is slightly
different again.

I have bisected the problem to r245135, and have confirmed that reverting this
on top of r245806 (today's HEAD commit) fixes the problem for builds that ran
into this on my test box.

[Bug tree-optimization/79777] New: [7 Regression] ICE on -Os and above in on aarch64-linux-gnu (internal compiler error: in VN_INFO_GET, at tree-ssa-sccvn.c:407 })

2017-03-01 Thread arnd at linaro dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79777

Bug ID: 79777
   Summary: [7 Regression] ICE on -Os and above in on
aarch64-linux-gnu (internal compiler error: in
VN_INFO_GET, at tree-ssa-sccvn.c:407 })
   Product: gcc
   Version: 7.0.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: arnd at linaro dot org
  Target Milestone: ---

Created attachment 40860
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40860=edit
preprocessed linux/fs/hpfs/anode.c, compressed, not reduced

I ran into a regression building the kernel with the latest gcc yesterday:

/git/arm-soc/fs/hpfs/anode.c: In function 'hpfs_truncate_btree':
/git/arm-soc/fs/hpfs/anode.c:399:6: internal compiler error: in VN_INFO_GET, at
tree-ssa-sccvn.c:407
 void hpfs_truncate_btree(struct super_block *s, secno f, int fno, unsigned
secs)
  ^~~
0xb47fe6 VN_INFO_GET(tree_node*)
/home/arnd/git/gcc/gcc/tree-ssa-sccvn.c:406
0xb27fd3 eliminate_insert
/home/arnd/git/gcc/gcc/tree-ssa-pre.c:4137
0xb27fd3 eliminate_dom_walker::before_dom_children(basic_block_def*)
/home/arnd/git/gcc/gcc/tree-ssa-pre.c:4271
0xe72f62 dom_walker::walk(basic_block_def*)
/home/arnd/git/gcc/gcc/domwalk.c:265
0xb26c5f eliminate
/home/arnd/git/gcc/gcc/tree-ssa-pre.c:4732
0xb26fbf execute
/home/arnd/git/gcc/gcc/tree-ssa-pre.c:5166

This seems very similar to pr79740, but is not fixed by r245780, which was done
to address that one. I build this with "aarch64-linux-gcc-7.0.1 -c anode.i -Os 
 -Wall -fno-strict-aliasing -Wno-pointer-sign".

[Bug ipa/79776] New: [7 Regression][CHKP] ICE on valid code in insert_vi_for_tree, at tree-ssa-structalias.c:2807

2017-03-01 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79776

Bug ID: 79776
   Summary: [7 Regression][CHKP] ICE on valid code in
insert_vi_for_tree, at tree-ssa-structalias.c:2807
   Product: gcc
   Version: 7.0
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 ucw dot cz, ienkovich at gcc dot gnu.org
  Target Milestone: ---

Starting from r236012 with ICE on:

$ g++ /home/marxin/Programming/gcc/gcc/testsuite/g++.dg/opt/thunk1.C -O3
-fcheck-pointer-bounds -mmpx  -fipa-pta
/home/marxin/Programming/gcc/gcc/testsuite/g++.dg/opt/thunk1.C:42:1: internal
compiler error: in insert_vi_for_tree, at tree-ssa-structalias.c:2807
 }
 ^
0x13f65fd insert_vi_for_tree
../../gcc/tree-ssa-structalias.c:2807
0x140371b associate_varinfo_to_alias
../../gcc/tree-ssa-structalias.c:7620
0xc3042d cgraph_node::call_for_symbol_thunks_and_aliases(bool (*)(cgraph_node*,
void*), void*, bool, bool)
../../gcc/cgraph.c:2354
0xc30589 cgraph_node::call_for_symbol_thunks_and_aliases(bool (*)(cgraph_node*,
void*), void*, bool, bool)
../../gcc/cgraph.c:2375
0xc304bf cgraph_node::call_for_symbol_thunks_and_aliases(bool (*)(cgraph_node*,
void*), void*, bool, bool)
../../gcc/cgraph.c:2362
0xc30589 cgraph_node::call_for_symbol_thunks_and_aliases(bool (*)(cgraph_node*,
void*), void*, bool, bool)
../../gcc/cgraph.c:2375
0x1404152 ipa_pta_execute
../../gcc/tree-ssa-structalias.c:7822
0x1405100 execute
../../gcc/tree-ssa-structalias.c:8142

[Bug tree-optimization/79740] [7 Regression] ICE on -Os and above in both 32-bit and 64-bit modes on x86_64-linux-gnu (internal compiler error: in VN_INFO_GET, at tree-ssa-sccvn.c:407 })

2017-03-01 Thread arnd at linaro dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79740

Arnd Bergmann  changed:

   What|Removed |Added

 CC||arnd at linaro dot org

--- Comment #7 from Arnd Bergmann  ---
(In reply to Richard Biener from comment #6)
> Fixed.

I still see an identical ICE with ARM64 on r245806. Opening a new PR.

[Bug c/79775] Confusing fix-it diagnostics with double pointers to structs

2017-03-01 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79775

Marek Polacek  changed:

   What|Removed |Added

   Keywords||diagnostic
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-03-01
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

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

[Bug c/79775] New: Confusing fix-it diagnostics with double pointers to structs

2017-03-01 Thread felix.von.s at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79775

Bug ID: 79775
   Summary: Confusing fix-it diagnostics with double pointers to
structs
   Product: gcc
   Version: 6.3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: felix.von.s at posteo dot de
  Target Milestone: ---

Created attachment 40859
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40859=edit
test.c

Attempting to compile the attached source file emits the following diagnostic:

test.c: In function 'bar':
test.c:10:14: error: '*foo' is a pointer; did you mean to use '->'?
 quux(*foo->a);
  ^~
  ->

The programmer's error is that they misremembered operator precedence rules:
struct member access binds stronger than pointer dereference. This diagnostic
above can only serve to confuse them further.

[Bug target/34903] -Os does not use lmw/stmw for multiple ranges

2017-03-01 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34903

--- Comment #11 from Segher Boessenkool  ---
lmw and stmw always restore/store r31, you cannot do multiple ranges.
lswi/stwsi could help.  Also, the current rs6000 code does not use
lmw/stmw if that wouldn't cover all GPRs to restore.

[Bug c++/79774] gcc -fsanitize=address with error

2017-03-01 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79774

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #1 from Martin Liška  ---
Can you please provide full command line? Or output with '--verbose' and you
command line.

[Bug tree-optimization/79345] [6/7 Regression] passing yet-uninitialized member as argument to base class constructor should warn (-Wunitialized)

2017-03-01 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79345

--- Comment #14 from rguenther at suse dot de  ---
On Wed, 1 Mar 2017, jakub at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79345
> 
> --- Comment #13 from Jakub Jelinek  ---
> (In reply to Richard Biener from comment #9)
> > actually the genemit fix doensn't fully work:
> > 
> > /space/rguenther/src/svn/trunk/gcc/config/i386/i386.md: In function
> > ‘rtx_def* gen_smulsi3_highpart(rtx, rtx, rtx)’:
> > /space/rguenther/src/svn/trunk/gcc/config/i386/i386.md:7380:26: error:
> > ‘operands[3]’ is used uninitialized in this function [-Werror=uninitialized]
> > (any_extend:TI
> > ~~^
> > /space/rguenther/src/svn/trunk/gcc/config/i386/i386.md: In function
> > ‘rtx_def* gen_umulsi3_highpart(rtx, rtx, rtx)’:
> > /space/rguenther/src/svn/trunk/gcc/config/i386/i386.md:7380:26: error:
> > ‘operands[3]’ is used uninitialized in this function [-Werror=uninitialized]
> > (any_extend:TI
> > ~~^
> > ...
> > 
> > bah.
> 
> --- gcc/genemit.c.jj2017-01-01 12:45:35.0 +0100
> +++ gcc/genemit.c   2017-03-01 10:51:27.474179940 +0100
> @@ -518,6 +518,9 @@ gen_expand (md_rtx_info *info)
> {
>   for (i = 0; i < stats.num_operand_vars; i++)
> {
> + if (i > MAX (stats.max_opno, stats.max_dup_opno)
> + && i <= stats.max_scratch_opno)
> +   continue;
>   printf ("operand%d = operands[%d];\n", i, i);
>   printf ("(void) operand%d;\n", i);
> }
> 
> should fix that.  Even if some define_insn doesn't have any match_dups, it can
> still have normal operands.

Looks like we have patterns with dups after scratches:

(define_expand "mul3_highpart"
  [(parallel [(set (match_operand:SWI48 0 "register_operand")
   (truncate:SWI48
 (lshiftrt:
   (mult:
 (any_extend:
   (match_operand:SWI48 1 "nonimmediate_operand"))
 (any_extend:
   (match_operand:SWI48 2 "register_operand")))
   (match_dup 4
  (clobber (match_scratch:SWI48 3))
  (clobber (reg:CC FLAGS_REG))])]

which then still warns:

/space/rguenther/src/svn/trunk/gcc/config/i386/i386.md: In function 
‘rtx_def* gen_umulsi3_highpart(rtx, rtx, rtx)’:
/space/rguenther/src/svn/trunk/gcc/config/i386/i386.md:7380:14: warning: 
‘operands[3]’ is used uninitialized in this function [-Wuninitialized]
(any_extend:TI
~~^~~~ 
...

[Bug tree-optimization/79345] [6/7 Regression] passing yet-uninitialized member as argument to base class constructor should warn (-Wunitialized)

2017-03-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79345

--- Comment #13 from Jakub Jelinek  ---
(In reply to Richard Biener from comment #9)
> actually the genemit fix doensn't fully work:
> 
> /space/rguenther/src/svn/trunk/gcc/config/i386/i386.md: In function
> ‘rtx_def* gen_smulsi3_highpart(rtx, rtx, rtx)’:
> /space/rguenther/src/svn/trunk/gcc/config/i386/i386.md:7380:26: error:
> ‘operands[3]’ is used uninitialized in this function [-Werror=uninitialized]
> (any_extend:TI
> ~~^
> /space/rguenther/src/svn/trunk/gcc/config/i386/i386.md: In function
> ‘rtx_def* gen_umulsi3_highpart(rtx, rtx, rtx)’:
> /space/rguenther/src/svn/trunk/gcc/config/i386/i386.md:7380:26: error:
> ‘operands[3]’ is used uninitialized in this function [-Werror=uninitialized]
> (any_extend:TI
> ~~^
> ...
> 
> bah.

--- gcc/genemit.c.jj2017-01-01 12:45:35.0 +0100
+++ gcc/genemit.c   2017-03-01 10:51:27.474179940 +0100
@@ -518,6 +518,9 @@ gen_expand (md_rtx_info *info)
{
  for (i = 0; i < stats.num_operand_vars; i++)
{
+ if (i > MAX (stats.max_opno, stats.max_dup_opno)
+ && i <= stats.max_scratch_opno)
+   continue;
  printf ("operand%d = operands[%d];\n", i, i);
  printf ("(void) operand%d;\n", i);
}

should fix that.  Even if some define_insn doesn't have any match_dups, it can
still have normal operands.

[Bug lto/78140] [7 Regression] libxul -flto uses 1GB more memory than gcc-6

2017-03-01 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78140

Markus Trippelsdorf  changed:

   What|Removed |Added

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

--- Comment #31 from Markus Trippelsdorf  ---
Fixed, thanks.

[Bug lto/78140] [7 Regression] libxul -flto uses 1GB more memory than gcc-6

2017-03-01 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78140

--- Comment #30 from Martin Jambor  ---
With the above commit, we hae avoided the vast majority of memory use
increase.  I think that using the same approach to cache ipa_vr
structures (used to store results of IPA-VR) could bring further
savings (possibly a hundred of megabytes?) so I will try that.
In any event, this may no longer qualify as P1.

[Bug tree-optimization/79345] [6/7 Regression] passing yet-uninitialized member as argument to base class constructor should warn (-Wunitialized)

2017-03-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79345

--- Comment #12 from Richard Biener  ---
Created attachment 40858
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40858=edit
unreduced testcase for false positive

Bootstrap issue #2 (posted questionable workaround, not analyzed properly):

> ./cc1plus  -quiet -O2 -Wuninitialized -o /dev/null ~/ipa-cp.ii 
In file included from /space/rguenther/src/svn/trunk/gcc/coretypes.h:365:0,
 from /space/rguenther/src/svn/trunk/gcc/ipa-cp.c:105:
/space/rguenther/src/svn/trunk/gcc/wide-int.h: In function ‘unsigned int
ipcp_driver()’:
/space/rguenther/src/svn/trunk/gcc/wide-int.h:881:3: warning:
‘*((void*)& +8)’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
   storage::operator = (x);
   ^~~
/space/rguenther/src/svn/trunk/gcc/wide-int.h:881:3: warning:
‘*((void*)& +16)’ may be used uninitialized in this function
[-Wmaybe-uninitialized]

[Bug tree-optimization/79345] [6/7 Regression] passing yet-uninitialized member as argument to base class constructor should warn (-Wunitialized)

2017-03-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79345

--- Comment #11 from Richard Biener  ---
Created attachment 40857
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40857=edit
unreduced testcase for false positive

Bootstrap issue #1 (I posted a reasonable workaround):

> ./cc1plus  -quiet -O2 -Wuninitialized -o /dev/null ~/fixed-value.ii 
In file included from /space/rguenther/src/svn/trunk/gcc/coretypes.h:365:0,
 from /space/rguenther/src/svn/trunk/gcc/fixed-value.c:22:
/space/rguenther/src/svn/trunk/gcc/wide-int.h: In function ‘void
fixed_from_string(fixed_value*, const char*, machine_mode)’:
/space/rguenther/src/svn/trunk/gcc/wide-int.h:818:40: warning: ‘*((void*)& w
+34359738360)’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
   unsigned HOST_WIDE_INT high = this->get_val ()[len - 1];
^
/space/rguenther/src/svn/trunk/gcc/wide-int.h: In function ‘bool
fixed_convert_from_real(fixed_value*, machine_mode, const real_value*, bool)’:
/space/rguenther/src/svn/trunk/gcc/wide-int.h:818:40: warning: ‘*((void*)& w
+34359738360)’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
   unsigned HOST_WIDE_INT high = this->get_val ()[len - 1];
^

[Bug lto/78140] [7 Regression] libxul -flto uses 1GB more memory than gcc-6

2017-03-01 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78140

--- Comment #29 from Martin Jambor  ---
Author: jamborm
Date: Wed Mar  1 09:37:27 2017
New Revision: 245805

URL: https://gcc.gnu.org/viewcvs?rev=245805=gcc=rev
Log:
[PR 78140] Reuse same IPA bits and VR info

2017-03-01  Martin Jambor  

PR lto/78140
* ipa-prop.h (ipa_bits): Removed field known.
(ipa_jump_func): Removed field vr_known.  Changed fields bits and m_vr
to pointers.  Adjusted their comments to warn about their sharing.
(ipcp_transformation_summary): Change bits to a vector of pointers.
(ipa_check_create_edge_args): Moved to ipa-prop.c, declare.
(ipa_get_ipa_bits_for_value): Declare.
* tree-vrp.h (value_range): Mark as GTY((for_user)).
* ipa-prop.c (ipa_bit_ggc_hash_traits): New.
(ipa_bits_hash_table): Likewise.
(ipa_vr_ggc_hash_traits): Likewise.
(ipa_vr_hash_table): Likewise.
(ipa_print_node_jump_functions_for_edge): Adjust for bits and m_vr
being pointers and vr_known being removed.
(ipa_set_jf_unknown): Likewise.
(ipa_get_ipa_bits_for_value): New function.
(ipa_set_jfunc_bits): Likewise.
(ipa_get_value_range): New overloaded functions.
(ipa_set_jfunc_vr): Likewise.
(ipa_compute_jump_functions_for_edge): Use the above functions to
construct bits and vr parts of jump functions.
(ipa_check_create_edge_args): Move here from ipa-prop.h, also allocate
ipa_bits_hash_table and ipa_vr_hash_table if they do not already
exist.
(ipcp_grow_transformations_if_necessary): Also allocate
ipa_bits_hash_table and ipa_vr_hash_table if they do not already
exist.
(ipa_node_params_t::duplicate): Do not copy bits, just pointers to
them.  Fix too long lines.
(ipa_write_jump_function): Adjust for bits and m_vr being pointers and
vr_known being removed.
(ipa_read_jump_function): Use new setter functions to construct bits
and vr parts of jump functions or set them to NULL.
(write_ipcp_transformation_info): Adjust for bits being pointers.
(read_ipcp_transformation_info): Likewise.
(ipcp_update_bits): Likewise.  Fix excessively long lines a trailing
space.
Include gt-ipa-prop.h.
* ipa-cp.c (propagate_bits_across_jump_function): Adjust for bits
being pointers.
(ipcp_store_bits_results): Likewise.
(propagate_vr_across_jump_function): Adjust for m_vr being a pointer.
Do not write to existing jump functions but use a temporary instead.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-cp.c
trunk/gcc/ipa-prop.c
trunk/gcc/ipa-prop.h
trunk/gcc/tree-vrp.h

[Bug middle-end/32401] [PPC/Altivec] Non optimal code structure with -mabi=altivec

2017-03-01 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32401

Segher Boessenkool  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||segher at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #2 from Segher Boessenkool  ---
This was fixed in GCC 5 or GCC 6.  So, closing this PR.

[Bug c++/79746] [7 Regression] Confusing -Wunused-but-set-parameter warning with virtual inheritance

2017-03-01 Thread sgunderson at bigfoot dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79746

--- Comment #6 from sgunderson at bigfoot dot com ---
Thanks. But I'm still curious; is the second code snippet well-formed or not?

[Bug target/79753] [7 Regression][CHKP] ICE in ix86_expand_builtin, at config/i386/i386.c:36869

2017-03-01 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79753

--- Comment #2 from Uroš Bizjak  ---
Breaks at:

#2  0x00e8c47d in ix86_expand_builtin (exp=0x2e7b5f88,
target=0x2e932528, subtarget=, mode=BND64mode, ignore=0)
at ../../git/gcc/gcc/config/i386/i386.c:36874
36874 gcc_assert (TREE_CODE (arg0) == SSA_NAME);
(gdb) list
36869: gen_bnd32_cu (op1, op0));
36870 return 0;
36871
36872   case IX86_BUILTIN_BNDRET:
36873 arg0 = CALL_EXPR_ARG (exp, 0);
36874 gcc_assert (TREE_CODE (arg0) == SSA_NAME);
36875 target = chkp_get_rtl_bounds (arg0);
36876
36877 /* If no bounds were specified for returned value,
36878then use INIT bounds.  It usually happens when
(gdb) p debug_generic_expr (exp)
__builtin_ia32_bndret (0)

[Bug c++/79746] [7 Regression] Confusing -Wunused-but-set-parameter warning with virtual inheritance

2017-03-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79746

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug tree-optimization/79734] [6 Regression] ICE: verify_gimple failed

2017-03-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79734

Jakub Jelinek  changed:

   What|Removed |Added

Summary|[6/7 Regression] ICE:   |[6 Regression] ICE:
   |verify_gimple failed|verify_gimple failed

--- Comment #8 from Jakub Jelinek  ---
Fixed on the trunk so far.

[Bug c++/79681] [6 Regression] ICE with constexpr and bitfield

2017-03-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79681

Jakub Jelinek  changed:

   What|Removed |Added

Summary|[6/7 Regression] ICE with   |[6 Regression] ICE with
   |constexpr and bitfield  |constexpr and bitfield

--- Comment #8 from Jakub Jelinek  ---
Fixed on the trunk so far.

[Bug c++/79681] [6/7 Regression] ICE with constexpr and bitfield

2017-03-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79681

--- Comment #7 from Jakub Jelinek  ---
Author: jakub
Date: Wed Mar  1 09:02:12 2017
New Revision: 245804

URL: https://gcc.gnu.org/viewcvs?rev=245804=gcc=rev
Log:
PR c++/79681
* fold-const.c (make_bit_field_ref): If orig_inner is COMPONENT_REF,
attempt to use its first operand as BIT_FIELD_REF base.

* g++.dg/cpp1y/constexpr-79681-1.C: New test.
* g++.dg/cpp1y/constexpr-79681-2.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp1y/constexpr-79681-1.C
trunk/gcc/testsuite/g++.dg/cpp1y/constexpr-79681-2.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
trunk/gcc/testsuite/ChangeLog

[Bug tree-optimization/79721] Scalar evolution introduces signed overflow

2017-03-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79721

Richard Biener  changed:

   What|Removed |Added

  Known to work||7.0.1

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

[Bug tree-optimization/79721] Scalar evolution introduces signed overflow

2017-03-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79721

--- Comment #4 from Richard Biener  ---
Author: rguenth
Date: Wed Mar  1 08:54:29 2017
New Revision: 245803

URL: https://gcc.gnu.org/viewcvs?rev=245803=gcc=rev
Log:
2017-03-01  Richard Biener  

PR middle-end/79721
* tree-chrec.c (chrec_evaluate): Perform computation of Newtons
interpolating formula in wrapping arithmetic.
(chrec_apply): Convert chrec_evaluate return value to wanted type.

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

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr79721.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-chrec.c

[Bug c++/79774] New: gcc -fsanitize=address with error

2017-03-01 Thread zhoujun48 at huawei dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79774

Bug ID: 79774
   Summary: gcc -fsanitize=address with error
   Product: gcc
   Version: 4.8.4
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zhoujun48 at huawei dot com
  Target Milestone: ---

Complie C++ code,GCC 4.8.4,CFLAGS= -lasan -fsanitize=address,but get this
error:
system/sepolicy/tools/fc_sort/fc_sort.c:49: error: undefined reference to
'__asan_report_load8'
system/sepolicy/tools/fc_sort/fc_sort.c:50: error: undefined reference to
'__asan_report_load8'
system/sepolicy/tools/fc_sort/fc_sort.c:51: error: undefined reference to
'__asan_report_load8'
system/sepolicy/tools/fc_sort/fc_sort.c:91: error: undefined reference to
'__asan_report_load1'

I have already used -lasan,
who can help me solve this problem
thank u

[Bug bootstrap/79771] [7 Regression] in-tree zlib breaks build

2017-03-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79771

Richard Biener  changed:

   What|Removed |Added

   Keywords||build
 Target||x86_64-pc-cygwin
  Component|regression  |bootstrap
   Target Milestone|--- |7.0
Summary|in-tree zlib breaks build   |[7 Regression] in-tree zlib
   ||breaks build

[Bug c++/79746] [7 Regression] Confusing -Wunused-but-set-parameter warning with virtual inheritance

2017-03-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79746

--- Comment #4 from Jakub Jelinek  ---
Author: jakub
Date: Wed Mar  1 08:35:55 2017
New Revision: 245802

URL: https://gcc.gnu.org/viewcvs?rev=245802=gcc=rev
Log:
PR c++/79746
* init.c (emit_mem_initializers): When not constructing vbases of
abstract classes, mark arguments as read for
-Wunused-but-set-parameter.

* g++.dg/warn/Wunused-parm-9.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/warn/Wunused-parm-9.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/init.c
trunk/gcc/testsuite/ChangeLog

[Bug tree-optimization/79734] [6/7 Regression] ICE: verify_gimple failed

2017-03-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79734

--- Comment #7 from Jakub Jelinek  ---
Author: jakub
Date: Wed Mar  1 08:34:48 2017
New Revision: 245801

URL: https://gcc.gnu.org/viewcvs?rev=245801=gcc=rev
Log:
PR tree-optimization/79734
* tree-vect-generic.c (expand_vector_condition): Optimize
AVX512 vector boolean VEC_COND_EXPRs into bitwise operations.
Handle VEC_COND_EXPR where comparison has different inner width from
type's inner width.

* g++.dg/opt/pr79734.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/opt/pr79734.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-generic.c

[Bug ipa/79772] [6/7 Regression][CHKP] ICE on invalid code in chkp_process_stmt (tree-chkp.c:4034)

2017-03-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79772

Richard Biener  changed:

   What|Removed |Added

 Target||x86_64-*-*, i?86-*-*
   Priority|P3  |P2
   Target Milestone|--- |6.4

[Bug ipa/79762] [6/7 Regression][CHKP] ICE in verify_cgraph_node failed (node is weakref but not an transparent_alias)

2017-03-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79762

Richard Biener  changed:

   What|Removed |Added

 Target||x86_64-*-*, i?86-*-*
   Priority|P3  |P2
   Target Milestone|--- |6.4

[Bug ipa/79764] [7 Regression][CHKP] ICE in chkp_make_addressed_object_bounds: Unexpected tree code bit_field_ref in tree-chkp.c:3528

2017-03-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79764

Richard Biener  changed:

   What|Removed |Added

 Target||x86_64-*-*, i?86-*-*
   Priority|P3  |P1
   Target Milestone|--- |7.0

--- Comment #2 from Richard Biener  ---
It's not new.  BIT_INSERT_EXPR is new.

[Bug target/79753] [7 Regression] ICE in ix86_expand_builtin, at config/i386/i386.c:36869

2017-03-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79753

Richard Biener  changed:

   What|Removed |Added

 Target||x86_64-*-*, i?86-*-*
   Priority|P3  |P1
   Target Milestone|--- |7.0

[Bug middle-end/79756] [5/6/7 Regression] ICE in execute_todo, at passes.c:2011

2017-03-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79756

--- Comment #4 from Richard Biener  ---
That is, we probably lack testcases for constexpr GCC vector extension indexing
uses?

[Bug target/79773] New: Missing documentation for -mabi={ms,sysv}

2017-03-01 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79773

Bug ID: 79773
   Summary: Missing documentation for -mabi={ms,sysv}
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Keywords: documentation
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
CC: hjl.tools at gmail dot com
  Target Milestone: ---

Hi.

The option is not documented, one can only see possible options via:

$ gcc --help=target -Q | grep mabi -A1
  -mabi=sysv
  -mabm [disabled]
--
  Known ABIs (for use with the -mabi= option):
ms sysv

Thanks

[Bug middle-end/79756] [5/6/7 Regression] ICE in execute_todo, at passes.c:2011

2017-03-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79756

Richard Biener  changed:

   What|Removed |Added

 CC||jsm28 at gcc dot gnu.org,
   ||rguenth at gcc dot gnu.org

--- Comment #3 from Richard Biener  ---
We run into convert_vector_to_array_for_subscript /
c_common_mark_addressable_vec with

<<< Unknown tree: c_maybe_const_expr

  <<< Unknown tree: compound_literal_expr
V D.1797 = {1, 0}; >>> >>>

not sure if that's intended.  But due to this we fail to mark the vector
as addressable which then results in this ICE.

Fix:

Index: gcc/c-family/c-common.c
===
--- gcc/c-family/c-common.c (revision 245780)
+++ gcc/c-family/c-common.c (working copy)
@@ -6534,6 +6534,8 @@ complete_array_type (tree *ptype, tree i
 void 
 c_common_mark_addressable_vec (tree t)
 {   
+  if (TREE_CODE (t) == C_MAYBE_CONST_EXPR)
+t = C_MAYBE_CONST_EXPR_EXPR (t);
   while (handled_component_p (t))
 t = TREE_OPERAND (t, 0);
   if (!VAR_P (t)

but note that convert_vector_to_array_for_subscript will return
VIEW_CONVERT_EXPR  (MAYBE_CONST (...)) then.  Maybe proper
operation is to instead return

MAYBE_CONST (VIEW_CONVERT_EXPR  (...))?

Or the caller (build_array_ref) was supposed to strip MAYBE_CONST and
put it back around the array-ref?

I don't understand the C_MAYBE_CONST stuff very well so leaving the actual
fix to C FE maintainers.

[Bug ipa/79761] [CHKP] ICE in chkp_find_bounds_1, at tree-chkp.c:3452

2017-03-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79761

--- Comment #1 from Richard Biener  ---
Looking at the code removing the two lines will just ICE via

  if (!bounds)
{
  if (dump_file && (dump_flags & TDF_DETAILS))
{
  fprintf (stderr, "chkp_find_bounds: cannot find bounds for
pointer\n");
  print_node (dump_file, "", ptr_src, 0);
}
  internal_error ("chkp_find_bounds: Cannot find bounds for pointer");
}

then.  The code assumes that for PARAM_DECLs chkp_get_registered_bounds should
have succeeded.

So yes, removing the two lines is ok.  But it doesn't fix the underlying bug...

<    1   2