Well, if you look at your compiler output listing, you'll know, for sure, what the compiler has done, and it is not what you think.
If you look at Appendix A in any Enterprise COBOL Language Reference you'll find this, under DATA DIVISION:
Specifying level numbers that are lower than other level numbers at the same hierarchical level in a data description entry. [Standard COBOL 85 requires that all elementary or group items at the same level in the hierarchy be assigned identical level numbers.]
Your fist level-10 defines a hierarchy which is ended by your second level-10. You then have level-15, which is subordinate to the level-10, another level-15, then the level-12. The level-12 is subordinate to the level-10, but not subordinate to the level-15. So it must be equivalent to the level-15. The Enterprise COBOL compiler "normalises" level-numbers, so if you look at your compile listing you'll see that those two level-15s and the level-12 all appear as level-3, with the level-15 subordinate to the level-12 normalised as a level-4.
I think you've quoted your GnuCOBOL message from an earlier version of your code or made a typo, the message would refer to level 12, not 18.
So, both the Enterprise COBOL compiler and the GnuCOBOL compiler are correct. They are just applying different rules, due to the IBM Extension to COBOL detailed above.
This assumes that all your level-15s are individual items defining storage.