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

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

Martin Liška  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
  Known to work||7.0

--- Comment #8 from Martin Liška  ---
Fixed on trunk so far.

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

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

--- Comment #7 from Martin Liška  ---
Author: marxin
Date: Mon Mar 20 10:06:00 2017
New Revision: 246276

URL: https://gcc.gnu.org/viewcvs?rev=246276=gcc=rev
Log:
MPX: fix PR middle-end/79753

2017-03-20  Martin Liska  

PR middle-end/79753
* tree-chkp.c (chkp_build_returned_bound): Do not build
returned bounds for a LHS that's not a BOUNDED_P type.
2017-03-20  Martin Liska  

PR middle-end/79753
* gcc.target/i386/mpx/pr79753.c: New test.

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

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

2017-03-14 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79753

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P1  |P2
 CC||law at redhat dot com

--- Comment #6 from Jeffrey A. Law  ---
Similarly to the other CHKP issue -- not a P1, downgrading to P2.

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

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

--- Comment #5 from Martin Liška  ---
Created attachment 40937
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40937=edit
Untested patch draft

I'm sending patch for that. Problem is that we return false
__builtin_ia32_bndret (_1), where _1 is SSA NAME. False is returned because
BNDRET builtin accepts void *, which is not compatible to TREE_TYPE(_2), which
is int type.

With my patch, return_bounds variable is properly assigned at
tree-inline.c:4660.

Thoughts?

[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.