This is the mail archive of the
mailing list for the GCC project.
Segmentation fault when calling a library fun - GCC bug?
- From: Mohamed Shafi <shafitvm at gmail dot com>
- To: GCC <gcc at gcc dot gnu dot org>
- Date: Fri, 25 Sep 2009 18:26:40 +0530
- Subject: Segmentation fault when calling a library fun - GCC bug?
I am doing a port for a 32bit target in GCC 4.4.0
I am getting segmentation fault in the function assign_temp in the
if (DECL_P (type_or_decl))
After analyzing the issue i find that this might be a bug. I just want
to confirm if that is the case or not.
In order to reproduce i think the target should have the following properties
a. Only 2 32bit registers available as argument registers.
b. Second 64bit value will be pushed in stack
c. ACCUMULATE_OUTGOING_ARGS is set
d. STRICT_ALIGNMENT is set
e. PARM_BOUNDARY is 32
When there is a library call for an operation that takes two 64bit
arguments, say division of two long long values - _divdi3, the
following sequence happens
emit_library_call_value -> emit_library_call_value_1 ->
emit_push_insn is called because the second argument is pushed on the
stack and ACCUMULATE_OUTGOING_ARGS is set.
assign_temp is called because STRICT_ALIGNMENT && PARM_BOUNDARY <
GET_MODE_ALIGNMENT (DImode) is true
Can somebody please confirm whether this is due to some mistake in my
port or a GCC bug?