[PR 88214] Check that an argument is a pointer
2018-12-10 Martin Jambor <mjambor@suse.cz> PR ipa/88214 * ipa-prop.c (determine_locally_known_aggregate_parts): Make sure we check pointers against pointers. testsuite/ * gcc.dg/ipa/pr88214.c: New test. From-SVN: r266953
This commit is contained in:
parent
f473762515
commit
63831879cf
4 changed files with 23 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2018-12-10 Martin Jambor <mjambor@suse.cz>
|
||||
|
||||
PR ipa/88214
|
||||
* ipa-prop.c (determine_locally_known_aggregate_parts): Make sure
|
||||
we check pointers against pointers.
|
||||
|
||||
2018-12-10 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR middle-end/88415
|
||||
|
|
|
@ -1569,7 +1569,8 @@ determine_locally_known_aggregate_parts (gcall *call, tree arg,
|
|||
if (TREE_CODE (arg) == SSA_NAME)
|
||||
{
|
||||
tree type_size;
|
||||
if (!tree_fits_uhwi_p (TYPE_SIZE (TREE_TYPE (arg_type))))
|
||||
if (!tree_fits_uhwi_p (TYPE_SIZE (TREE_TYPE (arg_type)))
|
||||
|| !POINTER_TYPE_P (TREE_TYPE (arg)))
|
||||
return;
|
||||
check_ref = true;
|
||||
arg_base = arg;
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2018-12-10 Martin Jambor <mjambor@suse.cz>
|
||||
|
||||
PR ipa/88214
|
||||
* gcc.dg/ipa/pr88214.c: New test.
|
||||
|
||||
2018-12-10 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR testsuite/88369
|
||||
|
|
10
gcc/testsuite/gcc.dg/ipa/pr88214.c
Normal file
10
gcc/testsuite/gcc.dg/ipa/pr88214.c
Normal file
|
@ -0,0 +1,10 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2" } */
|
||||
|
||||
void i();
|
||||
short a;
|
||||
void b(e) char * e;
|
||||
{
|
||||
i();
|
||||
b(a);
|
||||
}
|
Loading…
Add table
Reference in a new issue