[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pcc-list
Subject:    [Pcc] pcc as of 2015-01-24, a failure to compile with -O
From:       u-lxna () aetey ! se
Date:       2015-01-24 18:29:26
Message-ID: 20150124182926.GN19722 () example ! net
[Download RAW message or body]

The following testcase compiles without -O but fails with -O :
-------------------
$ cat a.c

typedef unsigned int uint32_t;
typedef uint32_t in_addr_t;
struct in_addr { in_addr_t s_addr; };
char *inet_ntoa (struct in_addr);

char *p;

void not_compilable_with_O(in_addr_t addr)
{  
   p = inet_ntoa(*((struct in_addr *) &addr));
}

$ pcc -c a.c
$ pcc -O -c a.c
a.c, line 10: compiler error: Cannot generate code, node 0x5660b000 op STARG
error: /[....]/ccom terminated with status 1
$ 
-------------------

A copy of this message has been submitted to jira.

Regards,
Rune

_______________________________________________
Pcc mailing list
Pcc@lists.ludd.ltu.se
https://lists.ludd.ltu.se/cgi-bin/mailman/listinfo/pcc
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic