This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/81734] New: [7/8 Regression] reference to inline function not emitted with -Os


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81734

            Bug ID: 81734
           Summary: [7/8 Regression] reference to inline function not
                    emitted with -Os
           Product: gcc
           Version: 7.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

[forwarded from https://bugs.debian.org/853613]

seen with the gcc-7-branch 

$ cat test4.c
int a;

inline void
builddircommand(void)
{
a++;
}

void test(void)
{
builddircommand();
}

int main() {return 0;}

$ gcc-6 -O2 -Wall test4.c
$ gcc-6 -Os -Wall test4.c
$ gcc-7 -O2 -Wall test4.c
$ gcc-7 -Os -Wall test4.c
/tmp/ccRQcwvp.o: In function `test':
test4.c:(.text+0x1): undefined reference to `builddircommand'
collect2: error: ld returned 1 exit status

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]