This is the mail archive of the
mailing list for the GCC project.
Re: Segmentation fault when calling a library fun - GCC bug?
- From: Ian Lance Taylor <iant at google dot com>
- To: Mohamed Shafi <shafitvm at gmail dot com>
- Cc: GCC <gcc at gcc dot gnu dot org>
- Date: Fri, 25 Sep 2009 07:34:14 -0700
- Subject: Re: Segmentation fault when calling a library fun - GCC bug?
- References: <email@example.com>
Mohamed Shafi <firstname.lastname@example.org> writes:
> 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
What is BIGGEST_ALIGNMENT? Does a 64-bit value require a 64-bit
alignment? If not, perhaps BIGGEST_ALIGNMENT should be 32.
If BIGGEST_ALIGNMENT must be 64 for some reason, but in this specific
case you have a DImode value which does not require 64-bit alignment,
then I agree that there is a case missing from the compiler.
Unfortunately it looks like it may be painful to fix, as the proper
fix will entail using TYPE_ALIGN of the type, but the type is not
currently available in emit_library_call_value