From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8449 invoked by alias); 25 Apr 2006 17:24:09 -0000 Received: (qmail 8438 invoked by uid 48); 25 Apr 2006 17:24:07 -0000 Date: Tue, 25 Apr 2006 17:24:00 -0000 Message-ID: <20060425172407.8437.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/27304] gfortran: Warn/abort when format in write does not fit passed arguments In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "tobias dot burnus at physik dot fu-berlin dot de" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-04/txt/msg02208.txt.bz2 List-Id: ------- Comment #1 from tobias dot burnus at physik dot fu-berlin dot de 2006-04-25 17:24 ------- Post scriptum: I actually see two bugs here: (a) for static format strings, the test should be done at the compile time (possibly also for c = '(''n'')'; write(*,c) n ) -> see NAG compiler (b) for dynamically created format strings, I think one should "crash" with a meaningful error message. At least that is what ifort, g95, NAG and pgf95 do. I like the error message of g95: --------------- At line 5 of file test.f90 (Unit 6) Fortran runtime error: Exhausted data descriptors in format ('n') --------------- (other wording in NAG f95: "No data edit descriptor in tail of format specification after reversion" [and no line number]) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27304