Apply patches from Andrew
authorRavi Pratap M <ravi@mono-cvs.ximian.com>
Tue, 25 Jun 2002 19:23:14 +0000 (19:23 -0000)
committerRavi Pratap M <ravi@mono-cvs.ximian.com>
Tue, 25 Jun 2002 19:23:14 +0000 (19:23 -0000)
svn path=/trunk/mcs/; revision=5452

mcs/errors/ChangeLog [new file with mode: 0644]
mcs/errors/cs0176.cs
mcs/errors/cs0196.cs
mcs/errors/cs0242.cs
mcs/errors/cs0255.cs
mcs/errors/fail
mcs/errors/makefile

diff --git a/mcs/errors/ChangeLog b/mcs/errors/ChangeLog
new file mode 100644 (file)
index 0000000..37fd224
--- /dev/null
@@ -0,0 +1,9 @@
+2002-06-24  Andrew Birkett  <adb@tardis.ed.ac.uk>
+
+       * fail: cs0121.cs, cs0157.cs and cs1501.cs no longer fail.  
+       * cs0176.cs: Method has to be public for correct test
+       * cs0196.cs, cs0242.cs: Do 'return' to stop null statement warning.
+       * cs0255.cs: Add assignment to stop 'unused variable' warning.
+       * makefile: Output is now like "Running test 42 .. OK".  Added --unsafe to 
+         make cs0193.cs, cs0196.cs and cs0214-3.cs work.
+
index 160d301788ebb0b8df6ddbbcf468bd0a775b5863..889971fc1172b936b5d0f6273e005f2ba660b034 100755 (executable)
@@ -1,7 +1,7 @@
 // cs0176.cs: cannot be accessed with an instance reference, use typename instead
 // Line: 12
 class X {
-       static void void_method ()
+       public static void void_method ()
        {
        }
 }
index edf4e6fd54e337bf8379fcd50c312c48bf9c41e7..57dd9c2b7b15b63ff7ca5a0e5fdcbd3be4b18983 100755 (executable)
@@ -6,6 +6,6 @@ unsafe class ZZ {
                int *p = null;
 
                if (p [10,4] == 4)
-                       ;
+                       return;
        }
 }
index 2a927d86b6ea0448113ba9cc2cd5319774ae7d73..c775f17342ea2ab51993851c9b750e50eebc7ab3 100755 (executable)
@@ -6,6 +6,6 @@ unsafe class ZZ {
                void *p = null;
 
                if (p [10] == 4)
-                       ;
+                       return;
        }
 }
index 10e2045385e5772da50533cd2001c9e25e9fa173..7fe38d595a0d6f63b7bd1451529753f02b0f8a34 100755 (executable)
@@ -1,13 +1,13 @@
 // cs0255.cs: Can not use stackalloc in finally or catch
 // Line: 10
 unsafe class X {
-       string s;
 
        static void Main ()
        {
                try {
                } catch {
-               char *ptr = stackalloc char [10U];
-}
+               char *ptr = stackalloc char [10];
+               ptr = ptr;
+               }
        }
 }      
index 511cec0bfcb9f078bf29d07035fb058df1793ee0..7ff0429db42b4d44494b9587ea7ece0ddbb2587a 100755 (executable)
@@ -1,53 +1,30 @@
 The following tests failed: 
 
-cs0051.cs, cs0060.cs, cs0111.cs
-
+cs0051.cs: We don't complain about inconsistent accessibility.
+cs0060.cs: We don't complain about inconsistent accessibility.
 cs0108.cs: We should re-enable the test code in the compiler
 cs0110.cs: Stack overflow in the compiler
-
-cs0118.cs:
-       We report the error, but the CSC error gives more information.
-
-cs0121.cs: Function deambiguator does not work here
-cs0136-2.cs cs0136.cs: Similar error reported (reuse of variable name, 128)
-cs0157.cs: Internal compiler error (null pointer reference)
+cs0111.cs: We don't complain about second occurance of method definition.
+cs0118.cs: We report the error, but the CSC error gives more information.
+cs0136.cs: Similar error reported (reuse of variable name, 128)
+cs0136-2.cs: Similar error reported (reuse of variable name, 128)
 cs0164.cs: We dont emit the warning for an unused label
-cs0165-2.cs cs0165.cs:
-       We need data flow analysis
-
-cs0171.cs 
-       We do not track unassigned struct fields on struct constructors 
-
-cs0216.cs:
-       We do not report missing operators.
-
-cs0234.cs:
-       Will be hard to fix;
-
-cs0654.cs:
-       Compiler crash
-
-cs1001.cs:
-       Compiler emits syntax error;  Its ok.
-
-       Compiler crashes
-cs1501.cs:
-       Compiler crashes.  Easy to fix
-
-cs1513.cs:
-       Syntax error;  We could provide better message
-
-cs1518.cs:
-       Syntax error;  We could provide better message
-
-cs1525.cs:
-       Syntax error;  We could provide better message
-
-cs1528.cs:
-       Syntax error;  We could provide better message
-
-cs1529.cs: 
-       Syntax error;  We could provide better message
+cs0165.cs: We need data flow analysis
+cs0165-2.cs: We need data flow analysis
+cs0171.cs: We do not track unassigned struct fields on struct constructors 
+cs0216.cs: We do not report missing operators.
+cs0234.cs: Will be hard to fix;
+cs0255.cs: Error isn't flagged.
+cs0523.cs: Error isn't flagged.
+cs0529.cs: We get error CS0146 instead
+cs0654.cs: Compiler crash
+cs1001.cs: Compiler emits syntax error;  Its ok.
+cs1513.cs: Syntax error;  We could provide better message
+cs1518.cs: Syntax error;  We could provide better message
+cs1525.cs: Syntax error;  We could provide better message
+cs1528.cs: Syntax error;  We could provide better message
+cs1529.cs: Syntax error;  We could provide better message
+cs1552.cs: Syntax error;  We could provide better message
+cs1604.cs: Error isn't flagged.
+cs-20.cs: Attribute error isn't flagged
 
-cs1552.cs:
-       Syntax error;  We could provide better message
index f51f021bc5fb05f055bad0639607382718dfba7e..bbc7930bb850632616f25d6faf9c62bc13acc2f5 100755 (executable)
@@ -1,10 +1,12 @@
 #
 # Compile at the maximum warning level to probe for warnings
 #
-MCS=../mcs/mcs.exe --wlevel 4
+#MCS=mono ../mcs/mcs.exe --wlevel 4 # for linux
+MCS=../mcs/mcs.exe --wlevel 4 # for windows
+
 
 all:
-       failed=false; \
+       failed=false; \
        for i in cs*.cs; do \
                case $$i in \
                        cs[0-9]*-[0-9]*cs) \
@@ -14,20 +16,12 @@ all:
                        error=`echo $$i | sed -e 's/cs*//' -e 's/.cs//'`; \
                        ;;\
                esac; \
-               echo $(MCS) --probe $$error $$i; \
-               $(MCS) --probe $$error 1 $$i > /dev/null; \
-               code=$$?; \
-               if test $$code != 123; then \
-                       echo Code is: $$code; \
-                       if [ x$$code = x124 ]; then \
-                               echo "Compiler failed to flag $$i"; \
-                       else \
-                               echo "Compiler failed to compile $$i"; \
-                       fi; \
-                       flist="$$flist $$i"; \
-                       failed=true; \
-               else \
-                       echo test $$i ok; \
+               echo -n "Running test $$i ... "; \
+               if $(MCS) --unsafe --expect-error $$error $$i > /dev/null; \
+               then echo OK; \
+               else echo FAILED; \
+                    flist="$$flist $$i"; \
+                    failed=true; \
                fi; \
        done; \
        if $$failed; then \