diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 0cef54db2489099bc8177d423b9e7ddf1ed7354c..3e70f31ae861f9de3d3da10d18ff725ef6208a13 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,13 @@
+2006-10-15  Bernhard Fischer  <aldot@gcc.gnu.org>
+
+	PR fortran/24767
+	* lang.opt (Wunused-labels): Remove.
+	* options.c: Remove references to gfc_option.warn_unused_labels.
+	* gfortran.h: Remove variable warn_unused_labels.               
+	* resolve.c (warn_unused_fortran_label) : Use warn_unused_label
+	instead of gfc_option.warn_unused_labels.
+	* invoke.texi: Remove documentation of -Wunused-labels.
+
 2006-10-14  Tobias Burnus  <burnus@net-b.de>
 
 	* gfortran.texi: Add link to GFortran apps
diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h
index 1e7e4880db7482762e4048637350cd4174bdcdcc..f07c2a6b94b7f7153c41cc3e4143e539f14087ca 100644
--- a/gcc/fortran/gfortran.h
+++ b/gcc/fortran/gfortran.h
@@ -1633,7 +1633,6 @@ typedef struct
   int warn_surprising;
   int warn_tabs;
   int warn_underflow;
-  int warn_unused_labels;
 
   int flag_all_intrinsics;
   int flag_default_double;
diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi
index 91ad3ca547b7ba61d19000101471aeffcbe71d5d..b742d169c73717feb52d0ed84d4e1ec40998c60f 100644
--- a/gcc/fortran/invoke.texi
+++ b/gcc/fortran/invoke.texi
@@ -130,7 +130,7 @@ by type.  Explanations are in the following sections.
 -fsyntax-only  -pedantic  -pedantic-errors @gol
 -w  -Wall  -Waliasing -Wampersand -Wconversion -Wimplicit-interface @gol
 -Wtabs -Wnonstd-intrinsics -Wsurprising -Wunderflow @gol
--Wunused-labels -Wline-truncation -W}
+-Wline-truncation -W}
 
 @item Debugging Options
 @xref{Debugging Options,,Options for Debugging Your Program or GCC}.
@@ -403,7 +403,7 @@ Inhibit all warning messages.
 @cindex warnings, all
 Enables commonly used warning options pertaining to usage that
 we recommend avoiding and that we believe are easy to avoid.
-This currently includes @option{-Wunused-labels}, @option{-Waliasing},
+This currently includes @option{-Waliasing},
 @option{-Wampersand}, @option{-Wsurprising}, @option{-Wnonstd-intrinsic},
 @option{-Wno-tabs}, and @option{-Wline-truncation}.
 
@@ -501,14 +501,6 @@ Produce a warning when numerical constant expressions are
 encountered, which yield an UNDERFLOW during compilation.
 
 
-@cindex -Wunused-labels option
-@cindex options, -Wunused-labels
-@item -Wunused-labels
-@cindex unused labels
-@cindex labels, unused
-Warn whenever a label is defined but never referenced.
-
-
 @cindex -Werror
 @cindex options, -Werror
 @item -Werror
diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt
index 2857ec87074146fcd623a8b498b71a44ee8670e6..cb8810ae62b43d1bda641f97109a3a91bc677822 100644
--- a/gcc/fortran/lang.opt
+++ b/gcc/fortran/lang.opt
@@ -73,10 +73,6 @@ Wunderflow
 Fortran
 Warn about underflow of numerical constant expressions
 
-Wunused-labels
-Fortran
-Warn when a label is unused
-
 fall-intrinsics
 Fortran RejectNegative
 All intrinsics procedures are available regardless of selected standard
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index 4d76030548cd070c0022bd02384fe5c872273305..96347042bf37b94078594976dd058d28d864388d 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -61,7 +61,6 @@ gfc_init_options (unsigned int argc ATTRIBUTE_UNUSED,
   gfc_option.warn_surprising = 0;
   gfc_option.warn_tabs = 1;
   gfc_option.warn_underflow = 1;
-  gfc_option.warn_unused_labels = 0;
 
   gfc_option.flag_all_intrinsics = 0;
   gfc_option.flag_default_double = 0;
@@ -303,8 +302,7 @@ set_Wall (void)
   gfc_option.warn_surprising = 1;
   gfc_option.warn_tabs = 0;
   gfc_option.warn_underflow = 1;
-  gfc_option.warn_unused_labels = 1;
- 
+
   set_Wunused (1);
   warn_return_type = 1;
   warn_switch = 1;
@@ -428,10 +426,6 @@ gfc_handle_option (size_t scode, const char *arg, int value)
       gfc_option.warn_underflow = value;
       break;
 
-    case OPT_Wunused_labels:
-      gfc_option.warn_unused_labels = value;
-      break;
-
     case OPT_fall_intrinsics:
       gfc_option.flag_all_intrinsics = 1;
       break;
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 6b9062db8571cf798820ab68b926f0bf3214ef7c..8fc2a6c37be7ba6689e52d530e424feff80c91a5 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -6907,7 +6907,7 @@ resolve_types (gfc_namespace * ns)
     resolve_equivalence (eq);
 
   /* Warn about unused labels.  */
-  if (gfc_option.warn_unused_labels)
+  if (warn_unused_label)
     warn_unused_fortran_label (ns->st_labels);
 
   gfc_resolve_uops (ns->uop_root);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 075f175dc46bbc64c8ecdcb14afdfa5eee8a307c..81eec2138872c306c0da94da9fe109984a93e333 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2006-10-15  Bernhard Fischer  <aldot@gcc.gnu.org>
+
+	PR fortran/24767
+	* gfortran.dg/label_4.f90: Adjust warning flag.
+
 2006-10-14 Paul Thomas <pault@gcc.gnu.org>
 
 	PR fortran/29371
diff --git a/gcc/testsuite/gfortran.dg/label_4.f90 b/gcc/testsuite/gfortran.dg/label_4.f90
index ade0f167f81faaea9f40c1c64e35585d2e85cb92..2a32f31a08111c2a828a33a256f77f827e831173 100644
--- a/gcc/testsuite/gfortran.dg/label_4.f90
+++ b/gcc/testsuite/gfortran.dg/label_4.f90
@@ -1,5 +1,5 @@
 ! { dg-do compile }
-! { dg-options "-Wunused-labels" }
+! { dg-options "-Wunused-label" }
 ! PR 26277
 ! We used to give an incorect warning about label 99 not being referenced
   open(unit=12,err=99)