Issue Details (XML | Word | Printable)

Key: PCC-294
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: David Soria Parra
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
pcc

"temporary %d outside boundaries" error when using -xinline in ccom.

Created: 04/Apr/11 03:26 PM   Updated: 10/Apr/11 05:26 PM
Component/s: pcc backend
Affects Version/s: None
Fix Version/s: None

Environment: ccom: pcc 1.0.0.RELEASE 20110221 for x86_64-unknown-linux-gnu


 Description  « Hide
The following code fails to compile with (assuming cpp created the tmp files correctly). It's taken from git.git mailmap.c:

/opt/libexec/ccom -v -xinline -g -xtemps -xdeljumps /tmp/ctm.LW689m /tmp/ctm.mD1ljj

--------------------------

struct mailmap_entry {
/* name and email for the simple mail-only case */
char *name;
char *email;
};
static inline void debug_mm(const char *format, ...) {}

int main(void) {
    char * s = "foobar";
    struct mailmap_entry *mi = (struct mailmap_entry*) malloc(sizeof(struct mailmap_entry));
    mi->name = "foo";
    mi->email = "test@example.com";

    debug_mm("mailmap: -- complex: '%s' -> '%s' <%s>\n", s, mi->name, mi->email);
    return 0;
}

-----------------------
The error is:

test.c, line 15: compiler error: 0x740830) temporary 7597479 outside boundaries 102-116

It works without -xinline.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
David Soria Parra added a comment - 04/Apr/11 03:27 PM
Please note that this is triggered by the "inline" keyword in "static inline void debug_mm..."

Anders Magnusson added a comment - 10/Apr/11 02:46 PM
Inline functions with varargs doesn't seem to work well on amd64...

Anders Magnusson added a comment - 10/Apr/11 05:26 PM
Functions with variadics should never be inlined, but the code checking for that were missing.
Now it is added. Thanks for reporting this bug.