diff mbox

Fix PR ipa/65557

Message ID 55521431.5090204@suse.cz
State New
Headers show

Commit Message

Martin Liška May 12, 2015, 2:54 p.m. UTC
On 04/30/2015 11:11 PM, Uros Bizjak wrote:
> Hello!
> 
>> 2015-03-29  Martin Liska  <mliska@suse.cz>
>>
>>    PR ipa/65557
>>    * ipa-icf.c (sem_function::equals_wpa): Check if IPA CP
>>    has already filled up function summary.
>>    (sem_item_optimizer::update_hash_by_addr_refs): Likewise.
>>
>> gcc/testsuite/ChangeLog:
>>
>> 2015-03-29  Martin Liska <mliska@suse.cz>
>>
>>    * g++.dg/ipa/pr65557.C: New test.
> 
> --- /dev/null
> +++ b/gcc/testsuite/g++.dg/ipa/pr65557.C
> @@ -0,0 +1,19 @@
> +/* { dg-do compile } */
> +/* { dg-options "-O2 -fdump-ipa-icf-details"  } */
> +
> +struct S0
> +{
> +  S0 ()
> +  {
> +  }
> +};
> +
> +struct S1
> +{
> +  S1 ()
> +  {
> +  }
> +};
> +
> +S0 s0;
> +S1 s1;
> 
> The testcase doesn't clean its IPA dump. However, there is also no
> scan dump function, so it is questionable, what the testcase tries to
> do with the dump. Also, the flags that trigger the bug in the PR are
> different: "-fdevirtualize -fipa-cp -fipa-icf-functions".
> 
> Can you please check the testcase?
> 
> Uros.
> 

Hi.

The test case caused ICE before the patch was applied. So removing -fdump*
is the right fix for the test.

I hope the patch is obvious. Should I also apply the patch for 5.1.0 branch?

Thanks,
Martin

Comments

Uros Bizjak May 12, 2015, 2:57 p.m. UTC | #1
On Tue, May 12, 2015 at 4:54 PM, Martin Liška <mliska@suse.cz> wrote:
> On 04/30/2015 11:11 PM, Uros Bizjak wrote:
>> Hello!
>>
>>> 2015-03-29  Martin Liska  <mliska@suse.cz>
>>>
>>>    PR ipa/65557
>>>    * ipa-icf.c (sem_function::equals_wpa): Check if IPA CP
>>>    has already filled up function summary.
>>>    (sem_item_optimizer::update_hash_by_addr_refs): Likewise.
>>>
>>> gcc/testsuite/ChangeLog:
>>>
>>> 2015-03-29  Martin Liska <mliska@suse.cz>
>>>
>>>    * g++.dg/ipa/pr65557.C: New test.
>>
>> --- /dev/null
>> +++ b/gcc/testsuite/g++.dg/ipa/pr65557.C
>> @@ -0,0 +1,19 @@
>> +/* { dg-do compile } */
>> +/* { dg-options "-O2 -fdump-ipa-icf-details"  } */
>> +
>> +struct S0
>> +{
>> +  S0 ()
>> +  {
>> +  }
>> +};
>> +
>> +struct S1
>> +{
>> +  S1 ()
>> +  {
>> +  }
>> +};
>> +
>> +S0 s0;
>> +S1 s1;
>>
>> The testcase doesn't clean its IPA dump. However, there is also no
>> scan dump function, so it is questionable, what the testcase tries to
>> do with the dump. Also, the flags that trigger the bug in the PR are
>> different: "-fdevirtualize -fipa-cp -fipa-icf-functions".
>>
>> Can you please check the testcase?
>>
>> Uros.
>>
>
> Hi.
>
> The test case caused ICE before the patch was applied. So removing -fdump*
> is the right fix for the test.
>
> I hope the patch is obvious. Should I also apply the patch for 5.1.0 branch?

Yes, please. Plenty of efforts were put in the cleaning of various dumps.

Thanks,
Uros.
diff mbox

Patch

From 9814faae5ed8a3ffc48932e514648aba559055ea Mon Sep 17 00:00:00 2001
From: mliska <mliska@suse.cz>
Date: Tue, 12 May 2015 16:46:08 +0200
Subject: [PATCH] Fix test case.

gcc/testsuite/ChangeLog:

2015-05-12  Martin Liska  <mliska@suse.cz>

	* g++.dg/ipa/pr65557.C: Remove unnecessary dump flag.
---
 gcc/testsuite/g++.dg/ipa/pr65557.C | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/g++.dg/ipa/pr65557.C b/gcc/testsuite/g++.dg/ipa/pr65557.C
index 2250bb0..98471a3 100644
--- a/gcc/testsuite/g++.dg/ipa/pr65557.C
+++ b/gcc/testsuite/g++.dg/ipa/pr65557.C
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-ipa-icf-details"  } */
+/* { dg-options "-O2"  } */
 
 struct S0
 {
-- 
2.1.4