https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90116

Ian Lance Taylor <ian at airs dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Ian Lance Taylor <ian at airs dot com> ---
I can recreate the compiler crash with GCC 8 branch, but it is fixed on trunk. 
On trunk I get

foo.go:3:7: error: array bound is not constant
    3 | var A[A] A
      |       ^
foo.go:3:7: error: expected type

Your second case is not a bug.  The Go language specification expresses
constraints in the text that are not expressed in the formal grammar.  In the
discussion of constant declaration, the spec says "Within a parenthesized const
declaration list the expression list may be omitted from any but the first
ConstSpec."  In your example the expression list is omitted from the first
ConstSpec, so the compiler is correct in reporting a parse error.

Reply via email to