This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR traget/24188 (-mcmodel=medium ICE)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>, Jan Hubicka <jh at suse dot cz>, gcc-patches at gcc dot gnu dot org
- Cc: fortran at gcc dot gnu dot org
- Date: Fri, 4 Nov 2005 15:59:27 -0500
- Subject: Re: PR traget/24188 (-mcmodel=medium ICE)
- References: <20051104121104.GB23668@kam.mff.cuni.cz> <20051104204638.GA12817@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Nov 04, 2005 at 12:46:38PM -0800, Richard Henderson wrote:
> On Fri, Nov 04, 2005 at 01:11:04PM +0100, Jan Hubicka wrote:
> > go into memory. This is result of code that think that size of 0 is
> > for incomplette types so they must be assumed to be infinite.
>
> The size of an empty string should be 1, not 0. So why does this happen?
That's a Fortran string, not C. So empty string there is really 0 bytes
long. Now the question is if it is really needed for the zero sized
string literal to actually make it down to the rtl passes in the common
cases.
The empty string literal will appear in calls like:
_gfortran_transfer_character ("", 0);
or
_gfortran_copy_string (10, &a, 0, "");
etc.
But I'm pretty certain none of those intrinsic routines would mind
if NULL has been passed instead.
Jakub