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] pr21061 - gfortran ignores -Werror


On Sun, Nov 05, 2006 at 02:45:34PM +0100, Bernhard Fischer wrote:
>On Sat, Nov 04, 2006 at 12:36:27PM +0100, Bernhard Fischer wrote:
>>On Thu, Nov 02, 2006 at 05:11:06PM -0800, Janis Johnson wrote:
>>>On Thu, Nov 02, 2006 at 06:46:11PM +0100, Bernhard Fischer wrote:
>>>> >It was not yet fixed nor committed due to problems with dejagnu.
>>>> >See http://gcc.gnu.org/ml/gcc/2006-10/msg00408.html
>>>> >
>>>> >I'm rewriting the testcases (for free- and fixed form) now and want to
>>>> >see if i can use dg-final { scan-assembler ".*" }.
>>>
>>>I figured out how to write procs output-exists and output-exists-not
>>>that can be called from dg-final to verify whether or not the compiler
>>>output file was not produced.  Will that help?
>>
>>That would help, yes. I'd need this on trunk, the 4_2 and 4_1 branches
>>if possible.
>>
>>Thanks!
>
>What i did come up with was the attached, fwiw.
>I did not (yet) look at how to distinguish dg-do modes, in order to get
>the output_file extension right.

output_file is already available as upvar 2, so using that.
>
>This works for me for
>$ head -n 4 gcc/testsuite/gfortran.dg/warnings_are_errors_1.f 
>! { dg-do compile }
>! { dg-options " -Werror" }
>! { dg-final { output-exists-not } }
>! PR fortran/21061
>
>but i take it there is a more elegant way to do this.

Also there must be a better place to put this than into scanasm.exp.
Suggestions?

I'm applying the parts against the fortran FE as ACKed by Steve Kargl
now. The testsuite snippet currently has no approval.

fortran/ChangeLog
2006-11-05  Bernhard Fischer  <aldot@gcc.gnu.org>

	PR fortran/21061
	* error.c (gfc_warning): If warnings_are_errors then treat
	warnings as errors with respect to the exit code.
	(gfc_notify_std): Ditto.
	(gfc_warning_now): Ditto.

testsuite/ChangeLog
2006-11-05  Bernhard Fischer  <aldot@gcc.gnu.org>

	PR fortran/21061
	* gfortran.dg/warnings_are_errors.f: New test.
	* gfortran.dg/warnings_are_errors.f90: New test.
	* lib/scanasm.exp (output-exists, output-exists-not): New
	routines to check if an output file does exist or not.


Attachment: gcc.gfortran.pr21061.03b.diff
Description: Text document


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