Commit 7d0c1352 by Richard Biener Committed by Richard Biener

re PR ipa/86271 (ICE due to size mismatch when inlining)

2018-06-26  Richard Biener  <rguenther@suse.de>

	PR middle-end/86271
	* fold-const.c (fold_convertible_p): Pointer extension
	isn't valid.

	* gcc.dg/pr86271.c: New testcase.

From-SVN: r262131
parent 27b1bf1e
2018-06-26 Richard Biener <rguenther@suse.de>
PR middle-end/86271
* fold-const.c (fold_convertible_p): Pointer extension
isn't valid.
2018-06-26 Alexandre Oliva <aoliva@redhat.com> 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
PR debug/86064 PR debug/86064
......
...@@ -2358,7 +2358,9 @@ fold_convertible_p (const_tree type, const_tree arg) ...@@ -2358,7 +2358,9 @@ fold_convertible_p (const_tree type, const_tree arg)
case INTEGER_TYPE: case ENUMERAL_TYPE: case BOOLEAN_TYPE: case INTEGER_TYPE: case ENUMERAL_TYPE: case BOOLEAN_TYPE:
case POINTER_TYPE: case REFERENCE_TYPE: case POINTER_TYPE: case REFERENCE_TYPE:
case OFFSET_TYPE: case OFFSET_TYPE:
return (INTEGRAL_TYPE_P (orig) || POINTER_TYPE_P (orig) return (INTEGRAL_TYPE_P (orig)
|| (POINTER_TYPE_P (orig)
&& TYPE_PRECISION (type) <= TYPE_PRECISION (orig))
|| TREE_CODE (orig) == OFFSET_TYPE); || TREE_CODE (orig) == OFFSET_TYPE);
case REAL_TYPE: case REAL_TYPE:
......
2018-06-26 Richard Biener <rguenther@suse.de>
PR middle-end/86271
* gcc.dg/pr86271.c: New testcase.
2018-06-26 Alexandre Oliva <aoliva@redhat.com> 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
PR debug/86064 PR debug/86064
......
/* { dg-do compile } */
/* { dg-options "-O2" } */
int main ()
{
int i;
foobar (i, &i); /* { dg-warning "implicit declaration" } */
}
int foobar (int a, long long b)
{
int c;
c = a % b;
a = a / b;
return a + b;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment