https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71884
--- Comment #9 from kargls at comcast dot net --- (In reply to anlauf from comment #8) > Created attachment 60157 [details] > Patch > > This patch rejects NULL() as source-expr, without or with MOLD. > > I believe that F03:C632 can be interpreted as being incompatible with having > NULL() here. Intel ifx also rejects any such use I tried. > > (NAG first complains that the MOLD argument to NULL is missing, but when > provided, it crashes severely at runtime.) Looks substantially like my patch from comment #6. ;-) Another way to think about the problem is that allocate(x, source=null()) is equivalent to allocate(x) x = null() which is nonsense for x an allocatable entity or pointer. Your patch is ok to commit with a suitable testcase.