zero-sized constants?

IainS developer@sandoe-acoustics.co.uk
Thu Aug 5 07:51:00 GMT 2010


On 5 Aug 2010, at 08:25, IainS wrote:

> I'm working on an update to the space allocator in darwin (i.e. bss  
> & friends) in a bid to re-enable section anchors on ppc and reduce  
> objects sizes on all variants where there are large zero-allocations.
>
> I notice that gfortran (and only gfortran) calls  
> ASM_DECLARE_CONSTANT_NAME () with a decl showing a zero-sized object  
> on a fair number of occasions.
>
> Now, I must be missing something, but my simple-minded thinking says  
> that the only constant value that can have zero size is zero itself...
> ... so can anyone elaborate?
>
> Essentially, do I need to handle this specially? (I.E. it's expected  
> behavior)
> - or is it a bug in the fortran FE? (in which case I'll try and  
> collect some more info.)

OK, a little gdb-ing reveals  that (at least some) are zero-sized  
string constants.

Are such useful?

(since, presumably, attempting to access one would be an error).

Iain



More information about the Fortran mailing list