public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "LpSolit at netscape dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/64804] New: Specific use of __attribute ((always_inline)) breaks MPX functionality with -fcheck-pointer-bounds -mmpx
Date: Wed, 28 Jan 2015 18:26:00 -0000	[thread overview]
Message-ID: <bug-64804-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 64804
           Summary: Specific use of __attribute ((always_inline)) breaks
                    MPX functionality with -fcheck-pointer-bounds -mmpx
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: christian.otterstad at gmail dot com

Using the latest git pull of GCC the following program fails to compile:

#include <stdio.h>

static inline void __attribute ((always_inline)) functionA(void)
{
        return;
}

static inline void __attribute ((always_inline)) functionB(void)
{
        functionA();
}

int test(void)
{
        functionB();

        return 0;
}


Attempt at compiling:

attribute_bug.c: In function 'functionB':
attribute_bug.c:18:1: error: Analyzed node has no reference to instrumented
version
 }
 ^
functionB/12 (functionB) @0x7f8d783a8dc8
  Type: function definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: 
  Availability: local
  First run: 0
  Function flags: body local
  Called by: 
  Calls: 
  Has instrumented version.
attribute_bug.c:18:1: internal compiler error: verify_cgraph_node failed
0x749ab0 cgraph_node::verify_node()
        ../../../temp_git/gcc/gcc/cgraph.c:3096
0x73eab7 symtab_node::verify()
        ../../../temp_git/gcc/gcc/symtab.c:1161
0xb5a089 optimize_inline_calls(tree_node*)
        ../../../temp_git/gcc/gcc/tree-inline.c:4936
0x10dadf8 early_inliner(function*)
        ../../../temp_git/gcc/gcc/ipa-inline.c:2577
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.


This is rewritten from code found in glibc, in libc-start.c (it also fails to
compile with the same error).

This may be related to fixes resulting from bug 64363
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64363 , as earlier versions of GCC
supporting -fcheck-pointer-bounds -mmpx do not feature this issue. However
since it is a bug of a different type I'm nevertheless opening a new bug for
this problem.

It appears gcc (GCC) 5.0.0 20150122 and up have this problem (latest version
tested: gcc (GCC) 5.0.0 20150126)

It appears that at least gcc (GCC) 5.0.0 20150107, gcc (GCC) 5.0.0 20150105,
gcc (GCC) 5.0.0 20141218 do not feature this bug.


             reply	other threads:[~2015-01-28 18:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-28 18:26 LpSolit at netscape dot net [this message]
2015-01-28 21:11 ` [Bug c/64804] " hjl.tools at gmail dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-64804-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).