https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109183
Bug ID: 109183 Summary: [regression?] since GCC 11.1, -MM -MMD generates "a-" prefixed dependency files Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: preprocessor Assignee: unassigned at gcc dot gnu.org Reporter: yann at droneaud dot fr Target Milestone: --- I've found a rather surprising behavior change when using GCC >= 11.1 to build some project using custom build environment. How to reproduce: : > test.c gcc -MM -MMD test.c test -e a-test.d && echo "unexpected dependency file name" I've git-bisect-ed between GCC 11.1 and GCC 10.1 and the behavior change did happen as the result of this commit: commit 1dedc12d186a110854537e1279b4e6c29f2df35a Author: Alexandre Oliva <ol...@adacore.com> Date: Tue May 26 04:30:15 2020 -0300 revamp dump and aux output names https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=1dedc12d186a110854537e1279b4e6c29f2df35a I didn't find an explanation there for this behavior change. It's not noted in the documentation either https://gcc.gnu.org/onlinedocs/gcc-11.3.0/gcc/Preprocessor-Options.html So this make me believe it's some kind of regression for a corner case. I understand the correct usage of -MMD is to be associated with some processing, -E, -S, -c, etc, while -MM imply -E, so perhaps -MM and -MMD are mutually exclusive and should not be allowed together. I dunno. But generating "a-" prefixed dependency files is rather unexpected.