Dear all, the attached patch fixes a long-standing issue with CLASS attributes when a declaration is scattered over multiple statements. The major part ("draft") of the patch is by Tobias, which I took up before it started to bit-rot too much, see PR. It is mainly about a proper updating and book-keeping of symbol attributes. While debugging the draft patch, I fixed a few disturbing memleaks in class.cc that showed up when looking at intermediate fallout. This patch also addresses issues reported in a few other PRs: pr53951, pr101101, pr104229, pr107380. These are mostly duplicates at some level. Regtested on x86_64-pc-linux-gnu. OK for mainline? Thanks, Harald