DynareTeam/dynare — pull request #715 by JohannesPfeifer (2014-08-21 11:20:10+00:00)
Title: Add check that prevents datafile from having same name as mod-file

Otherwise, the generated m-file might be called as the datafile, leading to infinite loops. The check cannot be moved to makedataset because M_.fname is not available there.