1! { dg-do compile }
2! Check that private entities in public namelists are rejected
3module namelist_1
4  public
5  integer,private :: x
6  namelist /n/ x ! { dg-error "cannot be member of PUBLIC namelist" "" }
7end module
8