]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
primary.c (match_boz_constant): Add missing break after gfc_error.
authorJakub Jelinek <jakub@redhat.com>
Fri, 14 Oct 2005 19:40:29 +0000 (21:40 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 14 Oct 2005 19:40:29 +0000 (21:40 +0200)
* primary.c (match_boz_constant): Add missing break after gfc_error.

* gfortran.dg/boz_5.f90: New test.

From-SVN: r105420

gcc/fortran/ChangeLog
gcc/fortran/primary.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/boz_5.f90 [new file with mode: 0644]

index 86aeeae89ec2630ed28a7bd4884cbb6e03404784..7f263753b7e9a6d078a07dd0305be430ba210064 100644 (file)
@@ -1,3 +1,7 @@
+2005-10-14  Jakub Jelinek  <jakub@redhat.com>
+
+       * primary.c (match_boz_constant): Add missing break after gfc_error.
+
 2005-10-12  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/24092
index 76eed6b623a067439cff2baad352acada3276882..e3e812795936180a5c42e27afd1451db917e7311 100644 (file)
@@ -351,10 +351,13 @@ match_boz_constant (gfc_expr ** result)
         {
        case 2:
           gfc_error ("Empty set of digits in binary constant at %C");
+         break;
        case 8:
           gfc_error ("Empty set of digits in octal constant at %C");
+         break;
        case 16:
           gfc_error ("Empty set of digits in hexadecimal constant at %C");
+         break;
         default:
          gcc_unreachable ();
         }
@@ -367,10 +370,13 @@ match_boz_constant (gfc_expr ** result)
         {
        case 2:
          gfc_error ("Illegal character in binary constant at %C");
+         break;
        case 8:
          gfc_error ("Illegal character in octal constant at %C");
+         break;
        case 16:
          gfc_error ("Illegal character in hexadecimal constant at %C");
+         break;
        default:
          gcc_unreachable ();
        }
index a0ee3a0baf4dd0a34c259f55dae2d2f0017037bb..fcb7bec7ece7adce7fae5a95004fb008f19ffd48 100644 (file)
@@ -1,3 +1,7 @@
+2005-10-14  Jakub Jelinek  <jakub@redhat.com>
+
+       * gfortran.dg/boz_5.f90: New test.
+
 2005-10-14  Nathan Sidwell  <nathan@codesourcery.com>
 
        PR c++/22551
diff --git a/gcc/testsuite/gfortran.dg/boz_5.f90 b/gcc/testsuite/gfortran.dg/boz_5.f90
new file mode 100644 (file)
index 0000000..3b1994b
--- /dev/null
@@ -0,0 +1,4 @@
+! { dg-do compile }
+  integer, dimension (2) :: i
+  i = (/Z'abcde', Z'abcde/)    ! { dg-error "Illegal character" }
+end