I can reproduce this with a couple-of-days-old CVS tip:
alvherre=# \c - test
FATAL: role "test" does not exist
And the server log says
FATAL: role "test" does not exist
TRAP: BadState(«!(((bool) ((OuterUserId) != ((Oid) 0))))», Archivo: «/pg/source/00orig/src/backend/utils/init/miscinit.c», Línea: 336)
--
Alvaro Herrera (<alvherre[a]alvh.no-ip.org>)
"[PostgreSQL] is a great group; in my opinion it is THE best open source
development communities in existence anywhere." (Lamar Owen)