[Bug tree-optimization/81110] tree-vrp optimize unsigned comparison to signed

2017-06-16 Thread qian.liu at ingenic dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81110

--- Comment #5 from Ada Liu  ---
(In reply to Andrew Pinski from comment #3)
> 65536*d[1] will overflow if d[1] is 65535 (0x).
> 
> If you did this instead it would be defined:
> 65536u*d[1]
> 
> as that is an unsigned * unsigned short so the unsigned short is implicitly
> converted into unsigned; in the original case, the unsigned short is
> implicitly converted into signed int.

But (65536*d[1]+d[0]) is convered to (unsigned long), should not be treated as
unsigned?

On gcc4.7.2 I can get expected result.

[Bug tree-optimization/81110] tree-vrp optimize unsigned comparison to signed

2017-06-16 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81110

--- Comment #6 from Andrew Pinski  ---
(In reply to Ada Liu from comment #5) 
> But (65536*d[1]+d[0]) is convered to (unsigned long), should not be treated
> as unsigned?

NO.  Both C and C++ language is clear here about the expression "65536*d[1]" is
done in signed int.

> On gcc4.7.2 I can get expected result.

Yes but newer gcc optimizes more and uses the fact that signed integer overflow
is undefined behavior more.

[Bug tree-optimization/81089] [8 Regression] ICE: tree check: expected ssa_name, have integer_cst in register_edge_assert_for_2, at tree-vrp.c:5023

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81089

--- Comment #9 from Richard Biener  ---
Author: rguenth
Date: Fri Jun 16 07:16:34 2017
New Revision: 249237

URL: https://gcc.gnu.org/viewcvs?rev=249237&root=gcc&view=rev
Log:
2017-06-16  Yury Gribov  

PR tree-optimization/81089
* tree-vrp.c (is_masked_range_test): Validate operands of
subexpression.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-vrp.c

[Bug other/81096] [8 regression] test case ttest in libbacktrace fails starting with its introduction in r249111

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81096

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |8.0

[Bug c++/81102] [7/8 Regression] G++ wrong error report for partial template specialization

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81102

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
 Status|UNCONFIRMED |NEW
  Known to work||6.3.1
   Keywords||rejects-valid
   Last reconfirmed||2017-06-16
 Ever confirmed|0   |1
Summary|G++ wrong error report for  |[7/8 Regression] G++ wrong
   |partial template|error report for partial
   |specialization  |template specialization
   Target Milestone|--- |7.2
  Known to fail||7.1.1

[Bug c++/81109] [8 Regression] new -Wclass-memaccess warning noisy

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81109

Richard Biener  changed:

   What|Removed |Added

   Keywords||diagnostic
   Target Milestone|--- |8.0

--- Comment #2 from Richard Biener  ---
"using assignment" can be quite expensive if the effect of the memset is the
same as the "non-trival types" constructor.

[Bug tree-optimization/81089] [8 Regression] ICE: tree check: expected ssa_name, have integer_cst in register_edge_assert_for_2, at tree-vrp.c:5023

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81089

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #10 from Richard Biener  ---
Should be fixed.

[Bug sanitizer/59454] blacklisting sanitized functions

2017-06-16 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59454

Martin Liška  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #4 from Martin Liška  ---
I'm pasting here Jakub's opinion which I agree with:

```
I'm strongly against the blacklist, that is not the way things are done in
GCC, you have corresponding attribute to mark functions you don't want to
instrument, people can macroize that with
__typeof (symbol) symbol __attribute__((__no_sanitize_address__));
But in any case, you mark it in the code rather than adding externally
some symbol list.

For others, perhaps, the question is what options to use for them, because
-asan-* options are clearly unacceptable.  Perhaps best might be
--param asan-instrument-reads=0 and similar.  Note I'd prefer not to
implement ABI changing options, like making red zone size, or shadow
shift or shadow base etc. variable, it is enough that libasan, etc. doesn't
have a stable ABI in between major GCC versions, we don't want to people
have issues with library X compiled with GCC 4.9 with one asan ABI and
another with a different one.
```

Thus I'm closing that as wontfix.

[Bug sanitizer/55310] libsanitizer can't be compiled use gcc on windows

2017-06-16 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55310

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #1 from Martin Liška  ---
Well, I'm curious whether you fulfill the requirement mentioned in the error
message?

[Bug sanitizer/81094] -fsanitize=object-size does not instrument aggregate call arguments

2017-06-16 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81094

--- Comment #1 from Jakub Jelinek  ---
Author: jakub
Date: Fri Jun 16 09:13:28 2017
New Revision: 249239

URL: https://gcc.gnu.org/viewcvs?rev=249239&root=gcc&view=rev
Log:
PR sanitizer/81094
* ubsan.c (instrument_null): Add T argument, use it instead
of computing it based on IS_LHS.
(instrument_object_size): Likewise.
(pass_ubsan::execute): Adjust instrument_null and
instrument_object_size callers to pass gimple_get_lhs or
gimple_assign_rhs1 result to it.  Use instrument_null instead of
calling get_base_address and instrument_mem_ref.  Handle
aggregate call arguments for object-size sanitization.

* c-c++-common/ubsan/object-size-11.c: New test.

Added:
trunk/gcc/testsuite/c-c++-common/ubsan/object-size-11.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/ubsan.c

[Bug sanitizer/59454] blacklisting sanitized functions

2017-06-16 Thread tetra2005 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59454

--- Comment #5 from Yuri Gribov  ---
(In reply to Martin Liška from comment #4)
> I'm pasting here Jakub's opinion which I agree with:
> 
> ```
> I'm strongly against the blacklist, that is not the way things are done in
> GCC, you have corresponding attribute to mark functions you don't want to
> instrument, people can macroize that with
> __typeof (symbol) symbol __attribute__((__no_sanitize_address__));
> But in any case, you mark it in the code rather than adding externally
> some symbol list.

Well, blacklists simplify integration of Asan to large codebases (e.g. full
Linux distro) where you often don't have the luxury of modifying the source
code. I believe was the main reason why they were added to Clang's sanitizer.

Just to double check, what are the technical arguments against using
blacklists?

[Bug sanitizer/59454] blacklisting sanitized functions

2017-06-16 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59454

--- Comment #6 from Jakub Jelinek  ---
(In reply to Yuri Gribov from comment #5)
> (In reply to Martin Liška from comment #4)
> > I'm pasting here Jakub's opinion which I agree with:
> > 
> > ```
> > I'm strongly against the blacklist, that is not the way things are done in
> > GCC, you have corresponding attribute to mark functions you don't want to
> > instrument, people can macroize that with
> > __typeof (symbol) symbol __attribute__((__no_sanitize_address__));
> > But in any case, you mark it in the code rather than adding externally
> > some symbol list.
> 
> Well, blacklists simplify integration of Asan to large codebases (e.g. full
> Linux distro) where you often don't have the luxury of modifying the source
> code. I believe was the main reason why they were added to Clang's sanitizer.
> 
> Just to double check, what are the technical arguments against using
> blacklists?

The problem is that strings can't uniquely identify all functions.  Either the
strings are mangled names, but then you can only use that to identify the
exported functions (and even then, for say comdat functions you can only affect
all of them or none), stuff like functions in anonymous namespaces, methods in
local types and the like are not accessible this way.  Or you use non-mangled
names and then it is even fuzzier on what you identify.  I know there is
#pragma weak supported for compatibility with something that also uses similar
kind of symbol matching, but IMNSHO it is equally misdesigned thing.

[Bug sanitizer/59965] All LTO tests fails with --with-build-config=bootstrap-asan

2017-06-16 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59965

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-06-16
 CC||marxin at gcc dot gnu.org,
   ||rguenth at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
I've noticed that discussion of the patch is stuck. Any update about it?

[Bug tree-optimization/81090] [8 Regression] [graphite] ICE in loop_preheader_edge

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81090

--- Comment #4 from Richard Biener  ---
So amending scev_reset to do free_numbers_of_iterations_estimates causes issues
with complete peeling which uses gimple_duplicate_loop_to_header_edge which
calls scev_reset (peeling invalidates cached CHRECs for the loop header PHIs
and derived SSA names) but then using ->bounds to mark paths in the loop copies
as gcc_unreachable () (remove_exits_and_undefined_stmts).  That looks fishy
somewhat, also because we defer this operation when processing adjacent loops
which will then eventually clear estimates before the 2nd adjacent loop is
processed (that might still work in the end if we only reset estimates for
a single loop at a time or estimates are computed on-demand again when using
the correct API).  Even more ugly so we ggc_free bounds ...

[Bug sanitizer/59965] All LTO tests fails with --with-build-config=bootstrap-asan

2017-06-16 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59965

--- Comment #2 from rguenther at suse dot de  ---
On Fri, 16 Jun 2017, marxin at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59965
> 
> Martin Liška  changed:
> 
>What|Removed |Added
> 
>  Status|UNCONFIRMED |NEW
>Last reconfirmed||2017-06-16
>  CC||marxin at gcc dot gnu.org,
>||rguenth at gcc dot gnu.org
>  Ever confirmed|0   |1
> 
> --- Comment #1 from Martin Liška  ---
> I've noticed that discussion of the patch is stuck. Any update about it?

Not really.  I'm not fond of those "hacks" to make various build-configs 
work.  If we want to sanitize the libiberty copy in cc1 then we need
to compile a separate sanitized libiberty for cc1.

[Bug sanitizer/63361] Test case c-c++-common/ubsan/float-cast-overflow-1.c fails on Pentium2

2017-06-16 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63361

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #2 from Martin Liška  ---
Hm, I'm just tried to run the test under qemu with Pentium2. Looks I've got the
same cpuinfo. Can you please run the test manually and paste here the output
once more?

[Bug fortran/80983] [F03] memory leak when calling procedure-pointer component with allocatable result

2017-06-16 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80983

--- Comment #4 from janus at gcc dot gnu.org ---
Author: janus
Date: Fri Jun 16 10:15:42 2017
New Revision: 249243

URL: https://gcc.gnu.org/viewcvs?rev=249243&root=gcc&view=rev
Log:
2017-06-16  Janus Weil  

PR fortran/80983
* gfortran.dg/proc_ptr_comp_51.f90: Repair test case.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/proc_ptr_comp_51.f90

[Bug sanitizer/81111] New: Cannot build libstdc++ with -fsanitize=undefined

2017-06-16 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=8

Bug ID: 8
   Summary: Cannot build libstdc++ with -fsanitize=undefined
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: sanitizer
  Assignee: unassigned at gcc dot gnu.org
  Reporter: redi 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, marxin at 
gcc dot gnu.org
  Target Milestone: ---

Created attachment 41568
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41568&action=edit
preprocessed source that causes ICE

I tried building libstdc++ using CXXFLAGS="-fsanitize=undefined" and it failed
building x86_64-pc-linux-gnu/32/libstdc++-v3/src/c++11/cxx11-locale-inst.o and
other files for the 32-bit lib.

The same files build OK for 64-bit using -fsanitize=undefined

The attached (unreduced) preprocessed source fails using a recent trunk:


$ /home/jwakely/src/gcc/build/gcc/cc1plus -fsanitize=undefined -m32
cxx11-locale-inst.ii  -quiet
In file included from
/home/jwakely/src/gcc/build/x86_64-pc-linux-gnu/32/libstdc++-v3/include/bits/stl_algobase.h:63:0,
 from
/home/jwakely/src/gcc/build/x86_64-pc-linux-gnu/32/libstdc++-v3/include/bits/char_traits.h:39,
 from
/home/jwakely/src/gcc/build/x86_64-pc-linux-gnu/32/libstdc++-v3/include/string:40,
 from
/home/jwakely/src/gcc/build/x86_64-pc-linux-gnu/32/libstdc++-v3/include/bits/locale_classes.h:40,
 from
/home/jwakely/src/gcc/build/x86_64-pc-linux-gnu/32/libstdc++-v3/include/locale:39,
 from
/home/jwakely/src/gcc/gcc/libstdc++-v3/src/c++11/locale-inst.cc:38,
 from
/home/jwakely/src/gcc/gcc/libstdc++-v3/src/c++11/cxx11-locale-inst.cc:39:
/home/jwakely/src/gcc/build/x86_64-pc-linux-gnu/32/libstdc++-v3/include/ext/numeric_traits.h:
In instantiation of ‘const long long unsigned int
__gnu_cxx::__numeric_traits_integer::__min’:
/home/jwakely/src/gcc/build/x86_64-pc-linux-gnu/32/libstdc++-v3/include/bits/locale_facets.tcc:474:7:
  required from ‘_InIter std::num_get<_CharT, _InIter>::_M_extract_int(_InIter,
_InIter, std::ios_base&, std::ios_base::iostate&, _ValueT&) const [with _ValueT
= long long unsigned int; _CharT = char; _InIter =
std::istreambuf_iterator >; std::ios_base::iostate
= std::_Ios_Iostate]’
/home/jwakely/src/gcc/gcc/libstdc++-v3/src/c++11/locale-inst.cc:143:27:  
required from here
/home/jwakely/src/gcc/build/x86_64-pc-linux-gnu/32/libstdc++-v3/include/ext/numeric_traits.h:58:67:
internal compiler error: Segmentation fault
   static const _Value __min = __glibcxx_min(_Value);
   ^
0xde006f crash_signal
/home/jwakely/src/gcc/gcc/gcc/toplev.c:338
0xb2ba10 tree_check(tree_node*, char const*, int, char const*, tree_code)
/home/jwakely/src/gcc/gcc/gcc/tree.h:3082
0xb2ba10 gimple_body(tree_node*)
/home/jwakely/src/gcc/gcc/gcc/gimple-expr.c:317
0xb538a4 gimple_add_tmp_var(tree_node*)
/home/jwakely/src/gcc/gcc/gcc/gimplify.c:753
0xb2c1ea create_tmp_var(tree_node*, char const*)
/home/jwakely/src/gcc/gcc/gcc/gimple-expr.c:477
0xe02151 ubsan_encode_value(tree_node*, bool)
/home/jwakely/src/gcc/gcc/gcc/ubsan.c:146
0x936fd4 ubsan_instrument_shift(unsigned int, tree_code, tree_node*,
tree_node*)
/home/jwakely/src/gcc/gcc/gcc/c-family/c-ubsan.c:215
0x8a960d cp_build_binary_op(unsigned int, tree_code, tree_node*, tree_node*,
int)
/home/jwakely/src/gcc/gcc/gcc/cp/typeck.c:5282
0x671fca build_new_op_1
/home/jwakely/src/gcc/gcc/gcc/cp/call.c:6019
0x6730de build_new_op(unsigned int, tree_code, int, tree_node*, tree_node*,
tree_node*, tree_node**, int)
/home/jwakely/src/gcc/gcc/gcc/cp/call.c:6064
0x89a252 build_x_binary_op(unsigned int, tree_code, tree_node*, tree_code,
tree_node*, tree_code, tree_node**, int)
/home/jwakely/src/gcc/gcc/gcc/cp/typeck.c:3959
0x810657 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
/home/jwakely/src/gcc/gcc/gcc/cp/pt.c:16921
0x812f16 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
/home/jwakely/src/gcc/gcc/gcc/cp/pt.c:17469
0x806f4e tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
/home/jwakely/src/gcc/gcc/gcc/cp/pt.c:16534
0x801db0 regenerate_decl_from_template
/home/jwakely/src/gcc/gcc/gcc/cp/pt.c:22419
0x801db0 instantiate_decl(tree_node*, bool, bool)
/home/jwakely/src/gcc/gcc/gcc/cp/pt.c:22854
0x72831f maybe_instantiate_decl
/home/jwakely/src/gcc/gcc/gcc/cp/decl2.c:4995
0x72af55 mark_used(tree_node*, int)
/home/jwakely/src/gcc/gcc/gcc/cp/decl2.c:5094
0x80fd97 tsubst_qualified_id
/home/jwakely/src/gcc/gcc/gcc/cp/pt.c

[Bug sanitizer/81111] Cannot build libstdc++ with -fsanitize=undefined

2017-06-16 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=8

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-06-16
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
Reduced:

template
  struct __numeric_traits_integer
  {

static const _Value __min = (((_Value)(-1) < 0) ? (_Value)1 <<
(sizeof(_Value) * 8 - ((_Value)(-1) < 0)) : (_Value)0);
  };

template
  const _Value __numeric_traits_integer<_Value>::__min;

void f()
{
  __numeric_traits_integer::__min;
}


$ /home/jwakely/src/gcc/build/gcc/cc1plus -fsanitize=undefined -m32 -quiet
ice.cc 
ice.cc: In instantiation of ‘const long long unsigned int
__numeric_traits_integer::__min’:
ice.cc:13:49:   required from here
ice.cc:5:65: internal compiler error: Segmentation fault
 static const _Value __min = (((_Value)(-1) < 0) ? (_Value)1 <<
(sizeof(_Value) * 8 - ((_Value)(-1) < 0)) : (_Value)0);
  
~~^~~~
0xde006f crash_signal
/home/jwakely/src/gcc/gcc/gcc/toplev.c:338
0xb2ba10 tree_check(tree_node*, char const*, int, char const*, tree_code)
/home/jwakely/src/gcc/gcc/gcc/tree.h:3082
0xb2ba10 gimple_body(tree_node*)
/home/jwakely/src/gcc/gcc/gcc/gimple-expr.c:317
0xb538a4 gimple_add_tmp_var(tree_node*)
/home/jwakely/src/gcc/gcc/gcc/gimplify.c:753
0xb2c1ea create_tmp_var(tree_node*, char const*)
/home/jwakely/src/gcc/gcc/gcc/gimple-expr.c:477
0xe02151 ubsan_encode_value(tree_node*, bool)
/home/jwakely/src/gcc/gcc/gcc/ubsan.c:146
0x936fd4 ubsan_instrument_shift(unsigned int, tree_code, tree_node*,
tree_node*)
/home/jwakely/src/gcc/gcc/gcc/c-family/c-ubsan.c:215
0x8a960d cp_build_binary_op(unsigned int, tree_code, tree_node*, tree_node*,
int)
/home/jwakely/src/gcc/gcc/gcc/cp/typeck.c:5282
0x671fca build_new_op_1
/home/jwakely/src/gcc/gcc/gcc/cp/call.c:6019
0x6730de build_new_op(unsigned int, tree_code, int, tree_node*, tree_node*,
tree_node*, tree_node**, int)
/home/jwakely/src/gcc/gcc/gcc/cp/call.c:6064
0x89a252 build_x_binary_op(unsigned int, tree_code, tree_node*, tree_code,
tree_node*, tree_code, tree_node**, int)
/home/jwakely/src/gcc/gcc/gcc/cp/typeck.c:3959
0x810657 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
/home/jwakely/src/gcc/gcc/gcc/cp/pt.c:16921
0x812f16 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
/home/jwakely/src/gcc/gcc/gcc/cp/pt.c:17469
0x806f4e tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
/home/jwakely/src/gcc/gcc/gcc/cp/pt.c:16534
0x801db0 regenerate_decl_from_template
/home/jwakely/src/gcc/gcc/gcc/cp/pt.c:22419
0x801db0 instantiate_decl(tree_node*, bool, bool)
/home/jwakely/src/gcc/gcc/gcc/cp/pt.c:22854
0x72831f maybe_instantiate_decl
/home/jwakely/src/gcc/gcc/gcc/cp/decl2.c:4995
0x72af55 mark_used(tree_node*, int)
/home/jwakely/src/gcc/gcc/gcc/cp/decl2.c:5094
0x86759a finish_id_expression(tree_node*, tree_node*, tree_node*, cp_id_kind*,
bool, bool, bool*, bool, bool, bool, bool, char const**, unsigned int)
/home/jwakely/src/gcc/gcc/gcc/cp/semantics.c:3705
0x7a3603 cp_parser_primary_expression
/home/jwakely/src/gcc/gcc/gcc/cp/parser.c:5325
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug c++/64644] "warning: anonymous union with no members" should be an error with -pedantic-errors

2017-06-16 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64644

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-06-16
   Assignee|unassigned at gcc dot gnu.org  |paolo.carlini at oracle 
dot com
 Ever confirmed|0   |1

--- Comment #4 from Paolo Carlini  ---
I'm taking care of this.

[Bug sanitizer/81111] Cannot build libstdc++ with -fsanitize=undefined

2017-06-16 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=8

--- Comment #2 from Jakub Jelinek  ---
I'll have a look.

[Bug c++/78014] -Wformat -vs- size_t

2017-06-16 Thread dgilbert at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78014

Dr. David Alan Gilbert  changed:

   What|Removed |Added

 CC||dgilbert at redhat dot com

--- Comment #7 from Dr. David Alan Gilbert  ---
A similar variant is:

#include 

int main(int argc, char *argv[])
{
  size_t s = 42;
  printf("%d\n", s);
}

t.c:7:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 2
has type ‘size_t {aka long unsigned int}’ [-Wformat=]
   printf("%d\n", s);
   ~^
   %ld

I'd expect it to be suggesting %zd here.
The difference in this case is it's already generating a warning - just not the
one I'd expect (and it already knows it's size_t).

[Bug tree-optimization/79547] duplicate strlen calls with same argument not folded

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79547

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug c++/70844] [6/7/8 Regression] spurious -Wuseless-cast warning with inherited constructors

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70844

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug driver/70936] [6/7/8 Regression] Hard-coded C++ header paths and relocation problem

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70936

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

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

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78856

Richard Biener  changed:

   What|Removed |Added

   Keywords||wrong-code
   Priority|P3  |P2
  Known to work||7.1.0
Version|unknown |7.0
  Known to fail||6.3.0

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

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78856

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

[Bug c++/78890] [5/6 Regression] ICE on invalid reference type in union

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78890

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug target/79145] [5/6 Regression] iwmmxt: Internal compiler error caused by an unrecognizable insn, during XORing long long with a char constant

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79145

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug middle-end/79212] [6 Regression] internal compiler error: in maybe_lookup_decl_in_outer_ctx, at omp-low.c:4134

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79212

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

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

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79571

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

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

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79734

Richard Biener  changed:

   What|Removed |Added

 Target||x86_64-*-*
   Priority|P3  |P2

[Bug fortran/80918] [6 Regression] Assumed size whole array rejected in depend clause

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80918

Richard Biener  changed:

   What|Removed |Added

   Keywords||rejects-valid
   Priority|P3  |P2

[Bug c++/80984] [5/6/7/8 Regression] ICE with label/variable ambiguity

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80984

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug rtl-optimization/80960] [5/6/7/8 Regression] Huge memory use when compiling a very large test case

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80960

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug target/80017] [5/6 Regression] ICE: Max. number of generated reload insns per insn is achieved (90)

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80017

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-06-16
 Ever confirmed|0   |1

[Bug testsuite/80678] [6 Regression] g++.dg/cpp1y/constexpr-79681-2.C fails with ICE starting with r247678

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80678

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #4 from Richard Biener  ---
Fixed, from looking at
https://gcc.gnu.org/ml/gcc-testresults/2017-06/msg01675.html.

[Bug ipa/81112] New: [7/8 Regression] internal compiler error: tree check: expected integer_cst, have range_expr in get_len, at tree.h:5321

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81112

Bug ID: 81112
   Summary: [7/8 Regression] internal compiler error: tree check:
expected integer_cst, have range_expr in get_len, at
tree.h:5321
   Product: gcc
   Version: 7.1.1
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: ipa
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rguenth at gcc dot gnu.org
CC: marxin at gcc dot gnu.org
  Target Milestone: ---
Target: x86_64-*-*, i?86-*-*

Created attachment 41569
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41569&action=edit
testcase

> g++-7 t.C -O2 -S
t.C:44:1: internal compiler error: Segmentation fault
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

checking-enabled:

t.C:44:1: internal compiler error: tree check: expected integer_cst, have
range_expr in get_len, at tree.h:5321
 }
 ^
0x150e49c tree_check_failed(tree_node const*, char const*, int, char const*,
...)
/space/rguenther/src/svn/gcc-7-branch/gcc/tree.c:9841
0x7c0758 tree_check(tree_node const*, char const*, int, char const*, tree_code)
/space/rguenther/src/svn/gcc-7-branch/gcc/tree.h:
0x8d1d2d wi::extended_tree<128>::get_len() const
/space/rguenther/src/svn/gcc-7-branch/gcc/tree.h:5321
0x8d1c06 wi::int_traits >
>::decompose(long*, unsigned int, generic_wide_int >
const&)
/space/rguenther/src/svn/gcc-7-branch/gcc/wide-int.h:929
0x8d1a48
wide_int_ref_storage::wide_int_ref_storage
> >(generic_wide_int > const&, unsigned int)
/space/rguenther/src/svn/gcc-7-branch/gcc/wide-int.h:976
0x8d15e4 generic_wide_int
>::generic_wide_int >
>(generic_wide_int > const&, unsigned int)
/space/rguenther/src/svn/gcc-7-branch/gcc/wide-int.h:753
0xa4a4c9
fixed_wide_int_storage<128>::fixed_wide_int_storage
> >(generic_wide_int > const&)
/space/rguenther/src/svn/gcc-7-branch/gcc/wide-int.h:1206
0xceaa68 generic_wide_int >&
generic_wide_int
>::operator= >
>(generic_wide_int > const&)
/space/rguenther/src/svn/gcc-7-branch/gcc/wide-int.h:881
0xefe89d find_constructor_constant_at_offset
/space/rguenther/src/svn/gcc-7-branch/gcc/ipa-prop.c:3033
0xefecb3 find_constructor_constant_at_offset
/space/rguenther/src/svn/gcc-7-branch/gcc/ipa-prop.c:3066
0xefef55 ipa_find_agg_cst_from_init
/space/rguenther/src/svn/gcc-7-branch/gcc/ipa-prop.c:3097
0xefef92 ipa_find_agg_cst_for_param(ipa_agg_jump_function*, tree_node*, long,
bool, bool*)
/space/rguenther/src/svn/gcc-7-branch/gcc/ipa-prop.c:3116
0xede95e evaluate_conditions_for_known_args
/space/rguenther/src/svn/gcc-7-branch/gcc/ipa-inline-analysis.c:857
0xedf0fe evaluate_properties_for_edge
/space/rguenther/src/svn/gcc-7-branch/gcc/ipa-inline-analysis.c:991
0xee85bd do_estimate_edge_size(cgraph_edge*)
/space/rguenther/src/svn/gcc-7-branch/gcc/ipa-inline-analysis.c:3909
0xedce5a estimate_edge_size
/space/rguenther/src/svn/gcc-7-branch/gcc/ipa-inline.h:297
0xedcec1 estimate_edge_growth
/space/rguenther/src/svn/gcc-7-branch/gcc/ipa-inline.h:308
0xee8992 do_estimate_growth_1
/space/rguenther/src/svn/gcc-7-branch/gcc/ipa-inline-analysis.c:4030
0xc2d9e0 cgraph_node::call_for_symbol_and_aliases(bool (*)(cgraph_node*,
void*), void*, bool)
/space/rguenther/src/svn/gcc-7-branch/gcc/cgraph.h:3150
0xee8a18 estimate_growth(cgraph_node*)
/space/rguenther/src/svn/gcc-7-branch/gcc/ipa-inline-analysis.c:4044

[Bug middle-end/81112] [7/8 Regression] internal compiler error: tree check: expected integer_cst, have range_expr in get_len, at tree.h:5321

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81112

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
  Component|ipa |middle-end
   Target Milestone|--- |7.2

--- Comment #1 from Richard Biener  ---
Given we see a range_expr this sounds more like a generic deficit in the
folders,
possibly latent on older branches.

[Bug libstdc++/81092] Missing symbols for new std::wstring constructors

2017-06-16 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81092

--- Comment #3 from Jonathan Wakely  ---
Author: redi
Date: Fri Jun 16 11:54:59 2017
New Revision: 249246

URL: https://gcc.gnu.org/viewcvs?rev=249246&root=gcc&view=rev
Log:
PR libstdc++/81092 add std::wstring symbols and bump library version

PR libstdc++/81092
* acinclude.m4: Bump libtool_VERSION.
* config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
* config/abi/pre/gnu.ver: Add wstring constructor symbols to
GLIBCXX_3.4.24 version and move random_device::_M_get_entropy() symbol
to new GLIBCXX_3.4.25 version.
* doc/xml/manual/abi.xml: Document new versions.
* doc/html/*: Regenerate.
* testsuite/21_strings/basic_string/cons/char/8.cc: Use base object
constructors to ensure required symbols are exported.
* testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
* testsuite/util/testsuite_abi.cc: Add new version.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/acinclude.m4
trunk/libstdc++-v3/config/abi/post/i386-linux-gnu/baseline_symbols.txt
trunk/libstdc++-v3/config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt
trunk/libstdc++-v3/config/abi/pre/gnu.ver
trunk/libstdc++-v3/doc/html/manual/abi.html
trunk/libstdc++-v3/doc/html/manual/bugs.html
trunk/libstdc++-v3/doc/html/manual/status.html
trunk/libstdc++-v3/doc/xml/manual/abi.xml
trunk/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/8.cc
trunk/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/8.cc
trunk/libstdc++-v3/testsuite/util/testsuite_abi.cc

[Bug ipa/81112] [7/8 Regression] internal compiler error: tree check: expected integer_cst, have range_expr in get_len, at tree.h:5321

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81112

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-06-16
  Component|middle-end  |ipa
 Ever confirmed|0   |1

--- Comment #2 from Richard Biener  ---
Ah, no.  This is ipa-prop.c special code (bah).

Index: gcc/ipa-prop.c
===
--- gcc/ipa-prop.c  (revision 249245)
+++ gcc/ipa-prop.c  (working copy)
@@ -3030,7 +3030,10 @@ find_constructor_constant_at_offset (tre

  if (index)
{
- off = wi::to_offset (index);
+if (TREE_CODE (index) == RANGE_EXPR)
+  off = wi::to_offset (TREE_OPERAND (index, 0));
+else
+  off = wi::to_offset (index);
  if (TYPE_DOMAIN (type) && TYPE_MIN_VALUE (TYPE_DOMAIN (type)))
{
  tree low_bound = TYPE_MIN_VALUE (TYPE_DOMAIN (type));
@@ -3039,6 +3042,9 @@ find_constructor_constant_at_offset (tre
  TYPE_PRECISION (TREE_TYPE (index)));
}
  off *= wi::to_offset (unit_size);
+if (TREE_CODE (index) == RANGE_EXPR)
+  off *= wi::sub (wi::to_offset (TREE_OPERAND (index, 1)),
+  wi::to_offset (TREE_OPERAND (index, 0)));
}
  else
off = wi::to_offset (unit_size) * ix;

Fixes this.

[Bug ipa/81112] [7/8 Regression] internal compiler error: tree check: expected integer_cst, have range_expr in get_len, at tree.h:5321

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81112

Richard Biener  changed:

   What|Removed |Added

  Attachment #41569|0   |1
is obsolete||

--- Comment #3 from Richard Biener  ---
Created attachment 41570
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41570&action=edit
testcase w/o x86 header

[Bug sanitizer/80998] Implement -fsanitize=pointer-overflow

2017-06-16 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80998

Jakub Jelinek  changed:

   What|Removed |Added

  Attachment #41550|0   |1
is obsolete||

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

Updated patch I'm going to bootstrap/regtest now.

[Bug ipa/81112] [7/8 Regression] internal compiler error: tree check: expected integer_cst, have range_expr in get_len, at tree.h:5321

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81112

--- Comment #4 from Richard Biener  ---
(In reply to Richard Biener from comment #2)
> Ah, no.  This is ipa-prop.c special code (bah).
> 
> Index: gcc/ipa-prop.c
> ===
> --- gcc/ipa-prop.c  (revision 249245)
> +++ gcc/ipa-prop.c  (working copy)
> @@ -3030,7 +3030,10 @@ find_constructor_constant_at_offset (tre
>  
>   if (index)
> {
> - off = wi::to_offset (index);
> +if (TREE_CODE (index) == RANGE_EXPR)
> +  off = wi::to_offset (TREE_OPERAND (index, 0));
> +else
> +  off = wi::to_offset (index);
>   if (TYPE_DOMAIN (type) && TYPE_MIN_VALUE (TYPE_DOMAIN (type)))
> {
>   tree low_bound = TYPE_MIN_VALUE (TYPE_DOMAIN (type));
> @@ -3039,6 +3042,9 @@ find_constructor_constant_at_offset (tre
>   TYPE_PRECISION (TREE_TYPE (index)));
> }
>   off *= wi::to_offset (unit_size);
> +if (TREE_CODE (index) == RANGE_EXPR)
> +  off *= wi::sub (wi::to_offset (TREE_OPERAND (index, 1)),
> +  wi::to_offset (TREE_OPERAND (index, 0)));
> }
>   else
> off = wi::to_offset (unit_size) * ix;
> 
> Fixes this.

Actually the 2nd hunk is bogus, and w/o it we'll simply handle RANGE_EXPR
conservatively (only matching with the very first index in it).  I'm
testing that.

Enhancements can be done on trunk.

[Bug libstdc++/81092] Missing symbols for new std::wstring constructors

2017-06-16 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81092

--- Comment #4 from Jonathan Wakely  ---
Author: redi
Date: Fri Jun 16 12:18:53 2017
New Revision: 249248

URL: https://gcc.gnu.org/viewcvs?rev=249248&root=gcc&view=rev
Log:
PR libstdc++/81092 add std::wstring symbols and bump library version

PR libstdc++/81092
* acinclude.m4: Bump libtool_VERSION.
* config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
* config/abi/pre/gnu.ver: Add wstring constructor symbols to new
GLIBCXX_3.4.24 version.
* doc/xml/manual/abi.xml: Document new versions.
* doc/html/*: Regenerate.
* testsuite/21_strings/basic_string/cons/char/8.cc: Use base object
constructors to ensure required symbols are exported.
* testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
* testsuite/util/testsuite_abi.cc: Add new version.

Modified:
branches/gcc-7-branch/libstdc++-v3/ChangeLog
branches/gcc-7-branch/libstdc++-v3/acinclude.m4
   
branches/gcc-7-branch/libstdc++-v3/config/abi/post/i386-linux-gnu/baseline_symbols.txt
   
branches/gcc-7-branch/libstdc++-v3/config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt
branches/gcc-7-branch/libstdc++-v3/config/abi/pre/gnu.ver
branches/gcc-7-branch/libstdc++-v3/doc/html/manual/abi.html
branches/gcc-7-branch/libstdc++-v3/doc/xml/manual/abi.xml
   
branches/gcc-7-branch/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/8.cc
   
branches/gcc-7-branch/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/8.cc
branches/gcc-7-branch/libstdc++-v3/testsuite/util/testsuite_abi.cc

[Bug tree-optimization/81090] [8 Regression] [graphite] ICE in loop_preheader_edge

2017-06-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81090

--- Comment #5 from Richard Biener  ---
Author: rguenth
Date: Fri Jun 16 12:19:24 2017
New Revision: 249249

URL: https://gcc.gnu.org/viewcvs?rev=249249&root=gcc&view=rev
Log:
2017-06-16  Richard Biener  

PR tree-optimization/81090
* passes.def (pass_record_bounds): Remove.
* tree-pass.h (make_pass_record_bounds): Likewise.
* tree-ssa-loop.c (pass_data_record_bounds, pass_record_bounds,
make_pass_record_bounds): Likewise.
* tree-ssa-loop-ivcanon.c (canonicalize_induction_variables): Do
not free niter estimates at the beginning but at the end.
* tree-scalar-evolution.c (scev_finalize): Free niter estimates.

* gcc.dg/graphite/pr81090.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/graphite/pr81090.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/passes.def
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-pass.h
trunk/gcc/tree-scalar-evolution.c
trunk/gcc/tree-ssa-loop-ivcanon.c
trunk/gcc/tree-ssa-loop.c

[Bug sanitizer/63361] Test case c-c++-common/ubsan/float-cast-overflow-1.c fails on Pentium2

2017-06-16 Thread bernd.edlinger at hotmail dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63361

--- Comment #3 from Bernd Edlinger  ---
I will start a boot-strap of the current trunk on that old Pentium2 system.
If it still works, it will take a few days.

[Bug sanitizer/81111] Cannot build libstdc++ with -fsanitize=undefined

2017-06-16 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=8

--- Comment #3 from Jakub Jelinek  ---
Testcase that ICEs also with -m64:
template 
struct N
{
  static const V m = (((V)(-1) < 0)
  ? (V)1 << (sizeof(V) * __CHAR_BIT__ - ((V)(-1) < 0))
  : (V) 0);
};

template
const V N::m;

void
foo ()
{
  N::m;
  N::m;
#ifdef __SIZEOF_INT128__
  N<__int128>::m;
  N::m;
#endif
}

I guess we want to create TARGET_EXPR in ubsan_encode_value.

[Bug target/81113] New: ICE with AVX structure field

2017-06-16 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81113

Bug ID: 81113
   Summary: ICE with AVX structure field
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: nathan at gcc dot gnu.org
  Target Milestone: ---

Created attachment 41572
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41572&action=edit
Exemplar

target is x86_64

The attached ICEs in expr.c, lowering the second call to Quux to RTL:
   void Frob(const Good&, const Bad&)during
RTL pass: expand

bug.ii: In function 'void Frob(const Good&, const Bad&)':
bug.ii:20:13: internal compiler error: in convert_move, at expr.c:231
   Quux (bad.val);
 ^~~
0xcc9f5b convert_move(rtx_def*, rtx_def*, int)
/data/users/nathans/trunk/obj/x86_64/../../src/gcc/expr.c:231
0xcd9bd1 store_expr_with_bounds(tree_node*, rtx_def*, int, bool, bool,
tree_node*)
/data/users/nathans/trunk/obj/x86_64/../../src/gcc/expr.c:5631
0xcd8038 expand_assignment(tree_node*, tree_node*, bool)
/data/users/nathans/trunk/obj/x86_64/../../src/gcc/expr.c:5323
0xb80c31 expand_gimple_stmt_1
/data/users/nathans/trunk/obj/x86_64/../../src/gcc/cfgexpand.c:3645
0xb8101c expand_gimple_stmt
/data/users/nathans/trunk/obj/x86_64/../../src/gcc/cfgexpand.c:3741
0xb880d6 expand_gimple_basic_block
/data/users/nathans/trunk/obj/x86_64/../../src/gcc/cfgexpand.c:5745
0xb89b06 execute
/data/users/nathans/trunk/obj/x86_64/../../src/gcc/cfgexpand.c:6354


The Good struct is passed just fine.  Both Good and Bad have the same size and
alignment.  I suspect different modes though.

[Bug other/81098] backtrace_pcinfo initialization not thread safe

2017-06-16 Thread ian at airs dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81098

Ian Lance Taylor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||ian at airs dot com
 Resolution|--- |FIXED

--- Comment #1 from Ian Lance Taylor  ---
I coincidentally fixed this earlier this week in subversion revision 249111
(https://gcc.gnu.org/ml/gcc-patches/2017-06/msg00738.html).

[Bug libstdc++/66803] std::this_thread::sleep_for gets interrupted by signals.

2017-06-16 Thread brootux at freenet dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66803

brootux at freenet dot de changed:

   What|Removed |Added

 CC||brootux at freenet dot de

--- Comment #2 from brootux at freenet dot de ---
Faced this problem in g++ 5.4.0 too.

[Bug target/46932] Inefficient code sequence to access local variable

2017-06-16 Thread ramana at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46932

Ramana Radhakrishnan  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-06-16
 CC||ramana at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Ramana Radhakrishnan  ---
Confirmed - still an issue with gcc trunk and same issue exists on aarch64 

( -fomit-frame-pointer is a red herring).

str x30, [sp, -32]!
add x1, sp, 32
strbw0, [x1, -1]!
mov x0, x1
bl  foo
ldr x30, [sp], 32
ret

[Bug libstdc++/66803] std::this_thread::sleep_for gets interrupted by signals.

2017-06-16 Thread brootux at freenet dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66803

--- Comment #3 from brootux at freenet dot de ---
workaround until fixed i.e. for 1 second:

auto wakeup_time = std::chrono::system_clock::now() + std::chrono::seconds(1);
while (std::chrono::system_clock::now() < wakeup_time) {
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}

[Bug target/46932] Inefficient code sequence to access local variable

2017-06-16 Thread ramana at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46932

Ramana Radhakrishnan  changed:

   What|Removed |Added

 Target|arm-linux-gnueabi   |arm-linux-gnueabi, aarch64*

--- Comment #2 from Ramana Radhakrishnan  ---
Update target.

[Bug debug/48315] ICE in mem_loc_descriptor, at dwarf2out.c:13899

2017-06-16 Thread ramana at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48315

--- Comment #3 from Ramana Radhakrishnan  ---
john,

is this still an issue ? 

I can't seem to reproduce this with any current release or trunk compilers ?

Ramana

[Bug target/48789] missed ARM optimization: use LDMIA

2017-06-16 Thread ramana at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48789

Ramana Radhakrishnan  changed:

   What|Removed |Added

   Priority|P3  |P4
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-06-16
 Ever confirmed|0   |1

--- Comment #5 from Ramana Radhakrishnan  ---
Confirmed but lower priority given all the other statements in c#2

[Bug target/80236] ARM NEON: Crash in std::map

2017-06-16 Thread ramana at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80236

Ramana Radhakrishnan  changed:

   What|Removed |Added

 CC||ramana at gcc dot gnu.org

--- Comment #13 from Ramana Radhakrishnan  ---
(In reply to Dominik Schmidt from comment #12)
> I'm using glibc-2.25.
> 
> Anything else I can provide?

I'm not sure what else to do here - It smells like a repeat of PR77728 but not
sure. Could you try with a newer snapshot from the GCC-6 branch and see if
anything comes out of it ?

[Bug rtl-optimization/79149] bad optimization on MIPS and ARM leading to excessive stack usage in some cases

2017-06-16 Thread ramana at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79149

Ramana Radhakrishnan  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-06-16
 CC||ramana at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #15 from Ramana Radhakrishnan  ---
Well given all the comments, confirmed then ... :)

[Bug testsuite/78318] FAIL: g++.dg/pr78112.C scan-assembler-times DW_AT_object_pointer 37

2017-06-16 Thread ramana at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78318

Ramana Radhakrishnan  changed:

   What|Removed |Added

 CC||ramana at gcc dot gnu.org

--- Comment #1 from Ramana Radhakrishnan  ---
Is this still an issue ? Surely isn't the fix just changing
scan-assembler-times to 38 ?

[Bug libstdc++/81092] Missing symbols for new std::wstring constructors

2017-06-16 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81092

--- Comment #5 from Jakub Jelinek  ---
Author: jakub
Date: Fri Jun 16 14:29:55 2017
New Revision: 249260

URL: https://gcc.gnu.org/viewcvs?rev=249260&root=gcc&view=rev
Log:
PR libstdc++/81092
* config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/config/abi/post/i486-linux-gnu/baseline_symbols.txt
trunk/libstdc++-v3/config/abi/post/powerpc-linux-gnu/baseline_symbols.txt
   
trunk/libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt

[Bug libstdc++/81092] Missing symbols for new std::wstring constructors

2017-06-16 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81092

--- Comment #6 from Jakub Jelinek  ---
Author: jakub
Date: Fri Jun 16 14:31:58 2017
New Revision: 249261

URL: https://gcc.gnu.org/viewcvs?rev=249261&root=gcc&view=rev
Log:
PR libstdc++/81092
* config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.

Modified:
branches/gcc-7-branch/libstdc++-v3/ChangeLog
   
branches/gcc-7-branch/libstdc++-v3/config/abi/post/i486-linux-gnu/baseline_symbols.txt

[Bug libstdc++/66803] std::this_thread::sleep_for gets interrupted by signals.

2017-06-16 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66803

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #4 from Jonathan Wakely  ---
This was already fixed for GCC 6.

[Bug sanitizer/81111] Cannot build libstdc++ with -fsanitize=undefined

2017-06-16 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=8

Jakub Jelinek  changed:

   What|Removed |Added

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

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

Untested fix.

[Bug libstdc++/81092] Missing symbols for new std::wstring constructors

2017-06-16 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81092

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #7 from Jonathan Wakely  ---
Fixed for 7.2

[Bug testsuite/78318] FAIL: g++.dg/pr78112.C scan-assembler-times DW_AT_object_pointer 37

2017-06-16 Thread thopre01 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78318

Thomas Preud'homme  changed:

   What|Removed |Added

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

--- Comment #2 from Thomas Preud'homme  ---
I assume the result is 37 for some platform. Anyway, I apologize since the scan
has been removed from the testcase so this is now fixed as of r243432.

[Bug c++/81102] [7/8 Regression] G++ wrong error report for partial template specialization

2017-06-16 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81102

Jason Merrill  changed:

   What|Removed |Added

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

[Bug testsuite/78318] FAIL: g++.dg/pr78112.C scan-assembler-times DW_AT_object_pointer 37

2017-06-16 Thread derodat at adacore dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78318

--- Comment #3 from Pierre-Marie de Rodat  ---
(In reply to Ramana Radhakrishnan from comment #1)
> Is this still an issue ? Surely isn't the fix just changing
> scan-assembler-times to 38 ?

I could not just change the count, as I got different counts from Thomas’. So
what I did was to create a smaller testcase (see PR78112) that would hopefully
get consistent results across platforms. AFAIK, nobody complained since then,
so I think we can close PR78318.

[Bug testsuite/78318] FAIL: g++.dg/pr78112.C scan-assembler-times DW_AT_object_pointer 37

2017-06-16 Thread derodat at adacore dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78318

--- Comment #4 from Pierre-Marie de Rodat  ---
(In reply to Thomas Preud'homme from comment #2)
> I assume the result is 37 for some platform. Anyway, I apologize since the
> scan has been removed from the testcase so this is now fixed as of r243432.

Ok, thank you Thomas!

[Bug tree-optimization/71815] SLSR misses several PHI candidate cases

2017-06-16 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71815

--- Comment #10 from Bill Schmidt  ---
I re-ran benchmarks today and the results that I saw before are no longer
present.  The patch is neutral with regard to SPEC cpu2006 performance on
ppc64le.  So I'll plan to have this patch reviewed.

[Bug c++/81109] [8 Regression] new -Wclass-memaccess warning noisy

2017-06-16 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81109

--- Comment #3 from Martin Sebor  ---
Calling memset to clear an object with a non-trivial default ctor doesn't
zero-initialize the object (or begin its lifetime), or establish any invariants
that the default ctor would otherwise set up.  Using the object after the
memset call is undefined, and the warning correctly points that out.  Examples
where clearing such an object is wrong and dangerous is a class that defines
either a reference member, or a const data member, or a pointer to member
object.  The correct way to initialize or clear such objects is by calling the
provided constructor or the copy assignment operator, whichever is appropriate.

In the test case in comment #0, the default ctor for A is private so the only
viable alternative is to use the trivial copy assignment operator to copy an
existing object to cache_[0].  This is also the suggestion offered by the
warning.

If the effects of the default ctor are the same as those of memset(this, 0,
sizeof *this) the ctor can either be omitted (assuming no other ctors are
defined) or, in C++ 11, defaulted(*).  That will eliminate the warning as well
as the overhead of the call if the user-provided ctor is not defined inline. 
Otherwise, using the special function in a loop when the size of the object is
not constant (e.g., when clearing an array with a runtime bound) can be more
efficient than calling memset because GCC only inlines memset with constant
sizes.

Alternatively, if none of these solutions is workable, the warning can be
suppressed by storing the address of the object in a named void* temporary and
using it as an argument to memset:

  void Flush() { void *p = cache_; __builtin_memset(p, 0, sizeof cache_); }

[*] It might be a useful enhancement to add an option to detect such ctors and
have GCC suggest one of these alternatives.

[Bug sanitizer/77631] no symbols in backtrace shown by ASan when debug info is split

2017-06-16 Thread d.khalikov at partner dot samsung.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77631

Denis Khalikov  changed:

   What|Removed |Added

  Attachment #41478|0   |1
is obsolete||

--- Comment #10 from Denis Khalikov  ---
Created attachment 41574
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41574&action=edit
patch for PR sanitizer/77631

[Bug sanitizer/81081] [ASAN] ASAN is not properly calling libbacktrace to symbolize program written on assembler

2017-06-16 Thread d.khalikov at partner dot samsung.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81081

--- Comment #9 from Denis Khalikov  ---
I've added patch for review 
https://reviews.llvm.org/D34149

[Bug target/80236] ARM NEON: Crash in std::map

2017-06-16 Thread d...@dominik-schmidt.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80236

--- Comment #14 from Dominik Schmidt  ---
Yes, will do on Sunday or next week.

[Bug c++/81109] [8 Regression] new -Wclass-memaccess warning noisy

2017-06-16 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81109

Markus Trippelsdorf  changed:

   What|Removed |Added

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

--- Comment #4 from Markus Trippelsdorf  ---
OK, thanks for the explanation. Closing as invalid.

[Bug ada/81114] New: GNAT mishandles filenames with UTF8 chars on case-insensitive filesystems

2017-06-16 Thread simon at pushface dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81114

Bug ID: 81114
   Summary: GNAT mishandles filenames with UTF8 chars on
case-insensitive filesystems
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
  Assignee: unassigned at gcc dot gnu.org
  Reporter: simon at pushface dot org
  Target Milestone: ---
 Build: x86_64-apple-darwin16

Created attachment 41575
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41575&action=edit
Demonstrator (with BOM)

The attached demonstrator contains two files, each with a UTF8
BOM. One file, pack3_user.adb, contains

   with Páck3;
   procedure Pack3_User is
   begin
  null;
   end Pack3_User;

while the other, páck3.ads, contains just

   package Páck3 is
   end Páck3;

There is no problem compiling on Linux (Debian Jessie). However, on
Darwin and Windows, we get

   $ gnatmake -c -f pack3_user.adb
   gcc -c pack3_user.adb
   gnatmake: "p?ck3.ads" not found

This is perhaps partly explained by looking at pack3_user.ali:


V "GNAT Lib v8"
M P W=8
P ZX

RN

U pack3_user%b  pack3_user.adb  be67fdbd NE OO SU
W pUe1ck3%s p?ck3.ads   p?ck3.ali   [A]

D p?ck3.ads 20170615165452 7221d8b1 páck3%s [B]
D pack3_user.adb20170616143450 cc46250c pack3_user%b
D system.ads20161018202953 085b6ffb system%s
X 1 páck3.ads   [C]
[...]


from which ([A], [B]) it is clear that GNAT is sometimes confused
about the file names.

Interestingly, sometimes it gets it right (last component on [B],
[C]).

The ALI file is written by Lib.Writ.Write_ALI. In two places it says

   if not File_Names_Case_Sensitive then
  Get_Name_String (Fname);
  To_Lower (Name_Buffer (1 .. Name_Len));<
  Fname := Name_Find;
   end if;

which is clearly the Wrong Thing to do if the file name is not
ASCII. In the ALI file above, the small-a-acute, which should be
encoded as C3 A1, has been rendered as E3 A1.

Using the undocumented env var GNAT_FILE_NAME_CASE_SENSITIVE alters
things:

   $ GNAT_FILE_NAME_CASE_SENSITIVE=1 gnatmake -c -f pack3_user.adb
   gcc -c pack3_user.adb
   gcc -c páck3.ads

so it's clear that the problem lies in this region.

Interestingly, [B] and [C] above show that the compiler does
understand how to low-case extended characters in strings. I haven't
yet been able to find where this is done.

[Bug target/81113] ICE with AVX structure field

2017-06-16 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81113

--- Comment #1 from Nathan Sidwell  ---
Upon investigation, I discover that Bad::val field_decl gets BLKmode, because
vector_type_mode is being used outside of an AVX target option region.

Simply using TYPE_MODE_RAW in layout_type dies horribly.

in expansion store_expr_with_bounds uses get_inner_reference to extract the
field, and that returns a BLKmode MEM_REF.  it then tries to use convert_move
to turn that into V8SFmode, but convert_move's not expecting a BLKmode source.

Not sure if the FIELD_DECL's mode is the error, or store_expr_with_bounds needs
to become smarter?

[Bug target/71778] [6/7/8 Regression][ARM] ICE using non-constant argument to Neon intrinsic that requires constant arguments

2017-06-16 Thread jgreenhalgh at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71778

--- Comment #7 from James Greenhalgh  ---
Author: jgreenhalgh
Date: Fri Jun 16 17:29:56 2017
New Revision: 249272

URL: https://gcc.gnu.org/viewcvs?rev=249272&root=gcc&view=rev
Log:
[Patch ARM] Fix PR71778

gcc/

PR target/71778
* config/arm/arm-builtins.c (arm_expand_builtin_args): Return TARGET
if given a non-constant argument for an intrinsic which requires a
constant.

gcc/testsuite/

PR target/71778
* gcc.target/arm/pr71778.c: New.


Added:
trunk/gcc/testsuite/gcc.target/arm/pr71778.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/arm/arm-builtins.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/81115] New: Didn't compile on Raspbian 2

2017-06-16 Thread Zenitur at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81115

Bug ID: 81115
   Summary: Didn't compile on Raspbian 2
   Product: gcc
   Version: 6.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: Zenitur at yandex dot ru
  Target Milestone: ---

In russian: http://paste.org.ru/?0pohzs

In english: http://paste.org.ru/?8ea0yk

../libcpp/libcpp.a(expr.o): In function `cpp_interpret_integer(cpp_reader*,
cpp_token const*, unsigned int)':
expr.c:(.text+0x27c4): undefined reference to `__aeabi_uldivmod'
collect2: error: ld returned 1 exit status

[Bug c++/80614] [7/8 Regression] Bad mangling for noexcept abominable function types

2017-06-16 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80614

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/80465] [7/8 Regression] ICE when evaluating a lamba noexcept spec with captures in C++1z

2017-06-16 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80465

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/81045] [7/8 Regression] return type deduction causes dependent types?

2017-06-16 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81045

Jason Merrill  changed:

   What|Removed |Added

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

[Bug target/81115] Didn't compile on Raspbian 2

2017-06-16 Thread ramana at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81115

Ramana Radhakrishnan  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2017-06-16
 CC||ramana at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Ramana Radhakrishnan  ---
Ok, how did you configure and did you follow instructions on
https://gcc.gnu.org/install and do you have the prerequisites installed.

It sounds like you are missing a few configure --with-arch --with-float
--with-fpu flags and something has gone wrong. 

The information here isn't enough to figure out what went wrong.

[Bug tree-optimization/80934] bzero should be assumed not to escape pointer argument

2017-06-16 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80934

--- Comment #3 from Martin Sebor  ---
Author: msebor
Date: Fri Jun 16 20:52:03 2017
New Revision: 249278

URL: https://gcc.gnu.org/viewcvs?rev=249278&root=gcc&view=rev
Log:
PR tree-optimization/80934 - bzero should be assumed not to escape pointer
argument
PR tree-optimization/80933 - redundant bzero/bcopy calls not eliminated

gcc/ChangeLog:

PR tree-optimization/80933
PR tree-optimization/80934
* builtins.c (fold_builtin_3): Do not handle bcmp here.
* gimple-fold.c (gimple_fold_builtin_bcmp): New function.
(gimple_fold_builtin_bcopy, gimple_fold_builtin_bzero): Likewise.
(gimple_fold_builtin): Call them.

gcc/testsuite/ChangeLog:

PR tree-optimization/80933
PR tree-optimization/80934
* gcc.dg/fold-bcopy.c: New test.
* gcc.dg/tree-ssa/ssa-dse-30.c: Likewise..
* gcc.dg/tree-ssa/alias-36.c: Likewise.
* gcc/testsuite/gcc.dg/pr79214.c: Adjust.
* gcc.dg/tree-prof/val-prof-7.c: Likewise.
* gcc.dg/Wsizeof-pointer-memaccess1.c: Likewise.
* gcc.dg/builtins-nonnull.c: Likewise.


Added:
trunk/gcc/testsuite/gcc.dg/fold-bcopy.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/alias-36.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-30.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/builtins.c
trunk/gcc/gimple-fold.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/Wsizeof-pointer-memaccess1.c
trunk/gcc/testsuite/gcc.dg/builtins-nonnull.c
trunk/gcc/testsuite/gcc.dg/pr79214.c
trunk/gcc/testsuite/gcc.dg/tree-prof/val-prof-7.c

[Bug tree-optimization/80933] redundant bzero/bcopy calls not eliminated

2017-06-16 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80933

--- Comment #6 from Martin Sebor  ---
Author: msebor
Date: Fri Jun 16 20:52:03 2017
New Revision: 249278

URL: https://gcc.gnu.org/viewcvs?rev=249278&root=gcc&view=rev
Log:
PR tree-optimization/80934 - bzero should be assumed not to escape pointer
argument
PR tree-optimization/80933 - redundant bzero/bcopy calls not eliminated

gcc/ChangeLog:

PR tree-optimization/80933
PR tree-optimization/80934
* builtins.c (fold_builtin_3): Do not handle bcmp here.
* gimple-fold.c (gimple_fold_builtin_bcmp): New function.
(gimple_fold_builtin_bcopy, gimple_fold_builtin_bzero): Likewise.
(gimple_fold_builtin): Call them.

gcc/testsuite/ChangeLog:

PR tree-optimization/80933
PR tree-optimization/80934
* gcc.dg/fold-bcopy.c: New test.
* gcc.dg/tree-ssa/ssa-dse-30.c: Likewise..
* gcc.dg/tree-ssa/alias-36.c: Likewise.
* gcc/testsuite/gcc.dg/pr79214.c: Adjust.
* gcc.dg/tree-prof/val-prof-7.c: Likewise.
* gcc.dg/Wsizeof-pointer-memaccess1.c: Likewise.
* gcc.dg/builtins-nonnull.c: Likewise.


Added:
trunk/gcc/testsuite/gcc.dg/fold-bcopy.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/alias-36.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-30.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/builtins.c
trunk/gcc/gimple-fold.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/Wsizeof-pointer-memaccess1.c
trunk/gcc/testsuite/gcc.dg/builtins-nonnull.c
trunk/gcc/testsuite/gcc.dg/pr79214.c
trunk/gcc/testsuite/gcc.dg/tree-prof/val-prof-7.c

[Bug tree-optimization/80934] bzero should be assumed not to escape pointer argument

2017-06-16 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80934

Martin Sebor  changed:

   What|Removed |Added

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

--- Comment #4 from Martin Sebor  ---
Fixed in r249278.

[Bug tree-optimization/80933] redundant bzero/bcopy calls not eliminated

2017-06-16 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80933

Martin Sebor  changed:

   What|Removed |Added

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

--- Comment #7 from Martin Sebor  ---
Fixed in r249278.

[Bug rtl-optimization/80352] Improper reload of operands with equiv pseudo

2017-06-16 Thread ramana at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80352

Ramana Radhakrishnan  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-06-16
 CC||ramana at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #6 from Ramana Radhakrishnan  ---
Confirmed then based on Vlad's comments.

[Bug target/80986] auto keyword variable lost its attributes

2017-06-16 Thread ramana at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80986

Ramana Radhakrishnan  changed:

   What|Removed |Added

 CC||ramana at gcc dot gnu.org

--- Comment #4 from Ramana Radhakrishnan  ---
(In reply to linzj from comment #2)
> I have found the cause of this bug.
> In 5.3, the function strip_typedefs only use
> result = cp_build_type_attribute_variant (result, TYPE_ATTRIBUTES (t));
> but in 6.3 remove_attributes prediction get invovled:
>   if (TYPE_ATTRIBUTES (t))
> {
>   if (remove_attributes)
> result = apply_identity_attributes (result, TYPE_ATTRIBUTES (t),
>remove_attributes);
>   else
> result = cp_build_type_attribute_variant (result, TYPE_ATTRIBUTES (t));
> }
> and unfortunately the pcs attribute is declared as
>   { "pcs",  1, 1, false, true,  true,  arm_handle_pcs_attribute,
> false },
> which affects_type_identity field is set to false, cause
> apply_identity_attributes
> drop this attribute.


Does affects_type_identity cause other user visible changes ? For e.g. based on
a cursory look it appears to affect mangling in C++. The comment in tree-core.h
simply says this affects the type's identity presumably implying that this
additionally adds value to the type's identity.

Almost all attributes I see in the front-ends or other backends has this set to
false and I'm certainly not happy switching this to true without understanding
the ramifications. 

In the use case that is considered here, I can see that it makes a difference
however without understanding what else can change I'm not happy with the patch
going in.

[Bug target/80236] ARM NEON: Crash in std::map

2017-06-16 Thread ramana at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80236

--- Comment #15 from Ramana Radhakrishnan  ---
(In reply to Dominik Schmidt from comment #14)
> Yes, will do on Sunday or next week.

Thanks.

[Bug middle-end/78233] compute_idf fails quick_push size check when compiling libgcc for Debian armel with qemu-arm-static

2017-06-16 Thread ramana at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78233

Ramana Radhakrishnan  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2017-06-16
 CC||ramana at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Ramana Radhakrishnan  ---
What are your configure flags for this to fail ? Without this I cannot work out
what the problem is - I know enough folks are bootstrapping armel in various
configurations and someone would have spotted this failure earlier.

[Bug target/81115] Didn't compile on Raspbian 2

2017-06-16 Thread Zenitur at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81115

--- Comment #2 from Zenithar Champion  ---
I'd used this article to compile GCC:
http://choccyhobnob.com/tutorials/gcc-6-on-raspberry-pi/ The only one change is
"sudo apt-get build-dep gcc-4.9" instead of "contrib/download_prerequisites"

../configure -v --enable-languages=c,c++ --prefix=/usr/local/gcc-6.2
--program-suffix=-6 --with-cpu=cortex-a53 --with-fpu=neon-fp-armv8
--with-float=hard --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf
--target=arm-linux-gnueabihf

[Bug c/11751] wrong evaluation order of an expression

2017-06-16 Thread oraytman1 at comcast dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=11751

Oleg  changed:

   What|Removed |Added

 CC||oraytman1 at comcast dot net

--- Comment #88 from Oleg  ---
Is this produces correct output?

#include 
#include 

int main()
{
  int i = 100;
  i = i++ + ++i;
  printf("i=%d\n", i);

  i = 100;
  i = ++i + i++;
  printf("i=%d\n", i);

  i = 100;
  i = i + i++;
  printf("i=%d\n", i);
  return 0;
}

output:

i=202
i=203

[Bug c/11751] wrong evaluation order of an expression

2017-06-16 Thread oraytman1 at comcast dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=11751

--- Comment #89 from Oleg  ---
Is this produces correct output?

#include 
#include 

int main()
{
  int i = 100;
  i = i++ + ++i;
  printf("i=%d\n", i);

  i = 100;
  i = ++i + i++;
  printf("i=%d\n", i);

  i = 100;
  i = i + i++;
  printf("i=%d\n", i);
  return 0;
}

output:

i=202
i=203

[Bug fortran/81116] New: Last character of allocatable-length string reset to blank in an assigment

2017-06-16 Thread clivegpage at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81116

Bug ID: 81116
   Summary: Last character of allocatable-length string reset to
blank in an assigment
   Product: gcc
   Version: 6.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: clivegpage at gmail dot com
  Target Milestone: ---

This program shows that the last character of "string" is replaced by a blank,
but when a different variable is on the left side of the assignment the
expected result is obtained:

program test10
implicit none
character(:), allocatable :: string, new
!
string = '1234567890'
string = string(1:5) // string(7:)
print *, ' string="', string, '"'
!
string = '1234567890'
new = string(1:5) // string(7:)
print *,' new=   "', new, '"'
end program test10

The output I get is:
  string="12345789 "
  new=   "123457890"

[Bug fortran/81116] Last character of allocatable-length string reset to blank in an assigment

2017-06-16 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81116

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-06-16
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
Confirmed from 4.8 up to trunk (8.0).

[Bug c++/80043] [6/7 Regression] ICE with pointer-to-member-function and -fpermissive

2017-06-16 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80043

--- Comment #5 from Jason Merrill  ---
Author: jason
Date: Sat Jun 17 02:27:33 2017
New Revision: 249317

URL: https://gcc.gnu.org/viewcvs?rev=249317&root=gcc&view=rev
Log:
PR c++/80639 - ICE with invalid PMF initialization.

PR c++/80043 - ICE with -fpermissive
* typeck.c (convert_for_assignment): Recurse when instantiate_type
returns without an error.

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

[Bug c++/80639] [7/8 Regression] ICE on valid C++11 code: in cxx_eval_outermost_constant_expr, at cp/constexpr.c:4642

2017-06-16 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80639

--- Comment #3 from Jason Merrill  ---
Author: jason
Date: Sat Jun 17 02:27:33 2017
New Revision: 249317

URL: https://gcc.gnu.org/viewcvs?rev=249317&root=gcc&view=rev
Log:
PR c++/80639 - ICE with invalid PMF initialization.

PR c++/80043 - ICE with -fpermissive
* typeck.c (convert_for_assignment): Recurse when instantiate_type
returns without an error.

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

[Bug c++/80831] [6/7/8 Regression] ICE: Segmentation fault with -fsyntax-only

2017-06-16 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80831

--- Comment #2 from Jason Merrill  ---
Author: jason
Date: Sat Jun 17 02:27:45 2017
New Revision: 249318

URL: https://gcc.gnu.org/viewcvs?rev=249318&root=gcc&view=rev
Log:
PR c++/80831 - ICE with -fsyntax-only.

* decl2.c (c_parse_final_cleanups): Use cgraph_node::get_create.

Added:
trunk/gcc/testsuite/g++.dg/other/fsyntax-only1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl2.c

[Bug fortran/80174] [meta-bug] Fortran lto issues

2017-06-16 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80174

--- Comment #1 from Jason Merrill  ---
Author: jason
Date: Sat Jun 17 02:27:52 2017
New Revision: 249319

URL: https://gcc.gnu.org/viewcvs?rev=249319&root=gcc&view=rev
Log:
PR c++/80174 - ICE with partial specialization of member template.

PR c++/71747
* pt.c (get_partial_spec_bindings): Only coerce innermost args.

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

[Bug c++/71747] [5/6 Regression] ICE on invalid C++11 code with misuse of overloaded operator '()': Segmentation fault (program cc1plus)

2017-06-16 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71747

--- Comment #5 from Jason Merrill  ---
Author: jason
Date: Sat Jun 17 02:27:52 2017
New Revision: 249319

URL: https://gcc.gnu.org/viewcvs?rev=249319&root=gcc&view=rev
Log:
PR c++/80174 - ICE with partial specialization of member template.

PR c++/71747
* pt.c (get_partial_spec_bindings): Only coerce innermost args.

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

  1   2   >