Bug 65305 - [5 regression] FAIL: gcc.target/i386/chkp-strchr.c and FAIL: gcc.target/i386/pr63995-2.c
Summary: [5 regression] FAIL: gcc.target/i386/chkp-strchr.c and FAIL: gcc.target/i386/...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: ipa (show other bugs)
Version: 5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-03 17:32 UTC by H.J. Lu
Modified: 2015-03-04 10:30 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2015-03-03 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2015-03-03 17:32:32 UTC
On Linux/x86, r221149 gave

FAIL: gcc.target/i386/chkp-strchr.c (internal compiler error)
FAIL: gcc.target/i386/chkp-strchr.c (test for excess errors)
FAIL: gcc.target/i386/pr63995-2.c (internal compiler error)
FAIL: gcc.target/i386/pr63995-2.c (test for excess errors)

[hjl@gnu-6 gcc]$ ./xgcc -B./ -O2 -g -fcheck-pointer-bounds -mmpx /export/gnu/import/git/sources/gcc/gcc/testsuite/gcc.target/i386/pr63995-2.c
/export/gnu/import/git/sources/gcc/gcc/testsuite/gcc.target/i386/pr63995-2.c: In function ‘init.chkp’:
/export/gnu/import/git/sources/gcc/gcc/testsuite/gcc.target/i386/pr63995-2.c:28:1: internal compiler error: Segmentation fault
 }
 ^
0xd23b34 crash_signal
	/export/gnu/import/git/sources/gcc/gcc/toplev.c:383
0xe334f1 gimple_code
	/export/gnu/import/git/sources/gcc/gcc/gimple.h:1553
0xe33f66 gimple_call_num_args
	/export/gnu/import/git/sources/gcc/gcc/gimple.h:2843
0xe42a81 ipa_sra_check_caller
	/export/gnu/import/git/sources/gcc/gcc/tree-sra.c:5039
0x83bfb8 cgraph_node::call_for_symbol_thunks_and_aliases(bool (*)(cgraph_node*, void*), void*, bool, bool)
	/export/gnu/import/git/sources/gcc/gcc/cgraph.c:2192
0xe42f0c ipa_sra_preliminary_function_checks
	/export/gnu/import/git/sources/gcc/gcc/tree-sra.c:5134
0xe42fb6 ipa_early_sra
	/export/gnu/import/git/sources/gcc/gcc/tree-sra.c:5163
0xe43306 execute
	/export/gnu/import/git/sources/gcc/gcc/tree-sra.c:5268
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
[hjl@gnu-6 gcc]$ 

r221131 is OK.
Comment 1 H.J. Lu 2015-03-03 18:32:53 UTC
It is caused by r221148.
Comment 2 Eric Botcazou 2015-03-03 22:23:29 UTC
It looks like we can now have cgraph_edge with null call_stmt so:

Index: tree-sra.c
===================================================================
--- tree-sra.c  (revision 221159)
+++ tree-sra.c  (working copy)
@@ -5036,6 +5036,8 @@ ipa_sra_check_caller (struct cgraph_node
   for (cgraph_edge *cs = node->callers; cs; cs = cs->next_caller)
     {
       gimple call_stmt = cs->call_stmt;
+      if (!call_stmt)
+       continue;
       unsigned count = gimple_call_num_args (call_stmt);
       for (unsigned i = 0; i < count; i++)
        {

is very likely the way to go.
Comment 3 Eric Botcazou 2015-03-04 10:30:29 UTC
Presumably fixed by Jan's patch.