[Bug bootstrap/80779] MPX bootstrap does not work on real hardware supporting that

2017-06-26 Thread aivchenk at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80779

--- Comment #2 from Alexander Ivchenko  ---
I made some progress a while back with that, mostly by adding
__attribute__((bnd_legacy)) just as in Martin's patches. I don't like that
approach though, as it does not look natural. The two thinks that I found are:

1) There are cases where we have union at the end of the struct, where one
field of the union is a flexible array. I marked those fields of the struct
with corresponding attribute, but, probably, more natural would be to add that
by default when "-fchkp-flexible-struct-trailing-arrays" option is used. We
have a lot of false positives because of that

2) I found a real bounds violation :) In ipa-chkp.c in
chkp_map_attr_arg_indexes  there is a "idx = indexes[idx - 1] + 1;" in the
loop. Here, "idx" may be zero

[Bug middle-end/77383] -fcheck-pointer-bounds -mmpx ICE with VLA struct return type

2017-05-17 Thread aivchenk at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77383

aivchenk at gcc dot gnu.org changed:

   What|Removed |Added

 CC||gerhard.steinmetz.fortran@t
   ||-online.de

--- Comment #5 from aivchenk at gcc dot gnu.org ---
*** Bug 79630 has been marked as a duplicate of this bug. ***

[Bug target/79630] ICE in make_decl_rtl, at varasm.c:1311

2017-05-17 Thread aivchenk at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79630

aivchenk at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #1 from aivchenk at gcc dot gnu.org ---
All of the mentioned testcases are reduced to this:

> cat nested-func-9.c 
foo_n;
fn1() {
  struct {
int a[foo_n]
  } fn2() {
  }
  fn2();
}
> cat pr8081.c 
a;
main() {
  typedef struct { char val[a] } block;
  block retframe_block() {}
  retframe_block();
}
> cat pr66817.c
a;
main() {
  typedef struct { char val[a] } block;
  block retframe_block() {}
  retframe_block();
}

which is essentially pr77383

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

[Bug other/65530] [meta-bug] -mmpx -fcheck-pointer-bounds failures

2017-05-17 Thread aivchenk at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65530
Bug 65530 depends on bug 79630, which changed state.

Bug 79630 Summary: ICE in make_decl_rtl, at varasm.c:1311
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79630

   What|Removed |Added

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

[Bug tree-optimization/80880] New: internal compiler error: in ix86_expand_builtin

2017-05-25 Thread aivchenk at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80880

Bug ID: 80880
   Summary: internal compiler error: in ix86_expand_builtin
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: aivchenk at gcc dot gnu.org
  Target Milestone: ---

While fixing bootstrap for MPX I faced this new ICE:

> cat gensupport.c
int *fn1() {
  int *r = fn1();
  if (r == __null)
return r;
}

> g++ gensupport.c -O1 -mmpx -fcheck-pointer-bounds

And the guilty revision is:

commit 380ca246b31875b432a536e54102959888d546fa
Author: rguenth 
Date:   Tue Apr 25 09:26:37 2017 +

2017-04-25  Richard Biener  

PR tree-optimization/79201
* tree-ssa-sink.c (statement_sink_location): Handle calls.

* gcc.dg/tree-ssa/ssa-sink-16.c: New testcase.
* gcc.target/i386/pr22152.c: Disable sinking.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@247159
138bc75d-0d04-0410-961f-82ee72b054a4

[Bug middle-end/79990] [CHKP] ICE in expand_expr_addr_expr_1, at expr.c:7790

2017-06-08 Thread aivchenk at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79990

Alexander Ivchenko  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||aivchenk at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #3 from Alexander Ivchenko  ---
Fixed with r249015:


Author: aivchenk 
Date:   Thu Jun 8 14:07:21 2017 +

gcc/ChangeLog:

2017-05-09  Alexander Ivchenko  

* tree-chkp.c (chkp_get_hard_register_var_fake_base_address):
New function.
(chkp_get_hard_register_fake_addr_expr): Ditto.
(chkp_build_addr_expr): Add check for hard reg case.
(chkp_parse_array_and_component_ref): Ditto.
(chkp_find_bounds_1): Ditto.
(chkp_process_stmt): Don't generate bounds store for
hard reg case.

[Bug other/65530] [meta-bug] -mmpx -fcheck-pointer-bounds failures

2017-06-08 Thread aivchenk at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65530
Bug 65530 depends on bug 79990, which changed state.

Bug 79990 Summary: [CHKP] ICE in expand_expr_addr_expr_1, at expr.c:7790
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79990

   What|Removed |Added

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

[Bug middle-end/79988] [7/8 Regression][CHKP] ICE in tree check: accessed operand 5 of call_expr with 4 operands in ix86_expand_builtin, at config/i386/i386.c:36851

2017-06-08 Thread aivchenk at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79988

--- Comment #4 from Alexander Ivchenko  ---
Author: aivchenk
Date: Thu Jun  8 16:05:59 2017
New Revision: 249023

URL: https://gcc.gnu.org/viewcvs?rev=249023&root=gcc&view=rev
Log:

2017-06-08  Alexander Ivchenko  

   PR middle-end/79988
   * tree-chkp.c (chkp_gimple_call_builtin_p): Remove
   gimple_call_builtin_p call.

017-06-08  Alexander Ivchenko  

PR middle-end/79988
* gcc.target/i386/mpx/pr79988.c: New test.




Added:
trunk/gcc/testsuite/gcc.target/i386/mpx/pr79988.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-chkp.c

[Bug middle-end/79988] [7/8 Regression][CHKP] ICE in tree check: accessed operand 5 of call_expr with 4 operands in ix86_expand_builtin, at config/i386/i386.c:36851

2017-06-09 Thread aivchenk at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79988

Alexander Ivchenko  changed:

   What|Removed |Added

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

--- Comment #5 from Alexander Ivchenko  ---
Fixed on trunk

[Bug other/65530] [meta-bug] -mmpx -fcheck-pointer-bounds failures

2017-06-09 Thread aivchenk at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65530
Bug 65530 depends on bug 79988, which changed state.

Bug 79988 Summary: [7/8 Regression][CHKP] ICE in tree check: accessed operand 5 
of call_expr with 4 operands in ix86_expand_builtin, at config/i386/i386.c:36851
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79988

   What|Removed |Added

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