Segher Boessenkool <seg...@kernel.crashing.org> writes: > Hi! > >> the callee explicitly disables some isa_flags the caller is using. > > No trailing spaces please. Updated. > >> + /* The callee's options must be a subset of the caller's options, i.e. >> + a vsx function may inline an altivec function, but a non-vsx function >> + must not inline a vsx function. However, for those options that the > > no-vsx instead of non-vsx? Or make it clear even more explicitly that this is > about having something explicitly disabled? (The code is clear > though). Thanks. > >> + >> +static inline void __attribute__ ((__always_inline__, target ("no-vsx"))) >> +foo () /* { dg-error "inlining failed in call to .* target specific option >> mismatch" } */ > > .* can match across lines. Not a huge deal here of course -- but maybe > adding (?n) to the regexp works? (Just at the very start of it). Seems (?n) does not help this case, so keep old one. > >> --- /dev/null >> +++ b/gcc/testsuite/gcc.target/powerpc/pr70010-2.c > >> diff --git a/gcc/testsuite/gcc.target/powerpc/pr70010-3.c >> b/gcc/testsuite/gcc.target/powerpc/pr70010-3.c >> new file mode 100644 > > Do you want to test anything in those two new testcases? Other than "it > compiles"? If compiling pass, it indicates inlining works fine for the caller and callee. So, I did not check other thing here. > >> +/* { dg-require-effective-target powerpc_vsx_ok } */ > > This line isn't necessary anymore I think? Or if it is, it is needed in > all these new testcases. Updated. > > Okay for trunk. Thanks to both of you! > > Also okay for 9 and 8, after waiting a week to see if there is fallout. > > > Segher
I just committed the patch. Thanks all for your helps! Segher, Richard, Peter, Andreas, Iain and all. Jiufu BR