This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, fortran] PR32124 - Don't give a run-time error if stat= has been specified for ALLOCATE


Hi,

Brooks Moses wrote:
>> Any ideas? (I knew why I did not want to have a test case when I
>> originally submitted the patch.)
> It would be nice if the runtime library could error out on when the
> size overflows, without needing to rely on the result ending up negative.
I think there are two ways this can happen: (a) at compile time - and
this is what happens here - and (b) at run time. At compile time, we
might be able to create a check whether we are overflowing (this is was
happens here). [I don't know whether there is a simple way of doing so,
maybe a test if negative could be build in? Or is the size argument not
easily accessible in the front end? It is in the dumped original tree.
GMP does not seem to supported.]

For run time, I think there is no easy way. I don't have seen may
systems which offer trapping (SIGFPE) of integer overflows. (There are
some which do, as googling shows.)

 * * *

Regarding the test case: Unless someone comes up with something which
works reliably on all (most) of the platforms, I really plan to remove
the test case. I will do so at the weekend except there are any
objections and ideas how to get a working test.

Tobias


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]