Patchwork lower gimple: Sustain line number info for returns if possible

login
register
mail settings
Submitter Eric Botcazou
Date Feb. 9, 2011, 7:20 p.m.
Message ID <201102092020.08071.ebotcazou@adacore.com>
Download mbox | patch
Permalink /patch/82520/
State New
Headers show

Comments

Eric Botcazou - Feb. 9, 2011, 7:20 p.m.
> this should fix the testsuite regressions.

Here are the missing adjustement for Objective-C++ and Ada.  Applied.


2011-02-09  Eric Botcazou  <ebotcazou@adacore.com>

	PR middle-end/47646
	* gnat.dg/uninit_func.adb: Adjust dg directive.


2011-02-09  Dominique Dhumieres <dominiq@lps.ens.fr>

	PR middle-end/47646
	* obj-c++.dg/attributes/method-noreturn-1.mm: Adjust dg directives.

Patch

Index: gnat.dg/uninit_func.adb
===================================================================
--- gnat.dg/uninit_func.adb	(revision 169914)
+++ gnat.dg/uninit_func.adb	(working copy)
@@ -2,12 +2,12 @@ 
 -- { dg-options "-O -Wall" }
 
 function uninit_func (A, B : Boolean) return Boolean is
-   C : Boolean; -- { dg-warning "may be used uninitialized" }
+   C : Boolean;
 begin
    if A then
       C := False;
    elsif B then
       C := True;
    end if;
-   return C;
+   return C; -- { dg-warning "may be used uninitialized" }
 end;
Index: obj-c++.dg/attributes/method-noreturn-1.mm
===================================================================
--- obj-c++.dg/attributes/method-noreturn-1.mm	(revision 169914)
+++ obj-c++.dg/attributes/method-noreturn-1.mm	(working copy)
@@ -18,11 +18,11 @@ 
 + (id) method1
 {
   return self;  /* { dg-warning "function declared .noreturn. has a .return. statement" } */
-}               /* { dg-warning ".noreturn. function does return" } */
+}               /* { dg-warning ".noreturn. function does return" "" { target *-*-* } 20 } */
 - (id) method2
 {
   return self;  /* { dg-warning "function declared .noreturn. has a .return. statement" } */
-}               /* { dg-warning ".noreturn. function does return" } */
+}               /* { dg-warning ".noreturn. function does return" "" { target *-*-* } 24 } */
 + (id) method3
 {
   abort ();