public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* r122342 ICE tree check at tree-cfg.c:2042
@ 2007-02-27 18:57 Shaun Jackman
2007-02-27 19:08 ` Andrew Pinski
0 siblings, 1 reply; 3+ messages in thread
From: Shaun Jackman @ 2007-02-27 18:57 UTC (permalink / raw)
To: GCC Bugs
[-- Attachment #1: Type: text/plain, Size: 520 bytes --]
$ avr-gcc -mmcu=atmega64 -g -O2 -Wall -Wextra -Werror -Os -I.. -I.
-MMD -DBOOTLOADER -DF_CPU=16000000 -c -o fs.o ../fs.c
../fs.c: In function 'fs_exec':
../fs.c:35: internal compiler error: tree check: expected class
'expression', have 'constant' (integer_cst) in find_taken_edge, at
tree-cfg.c:2042
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
$ avr-gcc --version |head -1
avr-gcc (GCC) 4.3.0 20070226 (experimental)
Thanks,
Shaun
[-- Attachment #2: fs.i --]
[-- Type: application/octet-stream, Size: 12326 bytes --]
# 1 "../fs.c"
# 1 "/home/sjackman/work/pathway/edin/edin/trunk/rdmbootloader//"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "../fs.c"
# 1 "../fs.h" 1
# 1 "../rdm.h" 1
# 1 "/usr/local/lib/gcc/avr/4.3.0/include/stdbool.h" 1 3 4
# 5 "../rdm.h" 2
# 1 "/usr/local/lib/gcc/avr/4.3.0/include/stddef.h" 1 3 4
# 152 "/usr/local/lib/gcc/avr/4.3.0/include/stddef.h" 3 4
typedef int ptrdiff_t;
# 214 "/usr/local/lib/gcc/avr/4.3.0/include/stddef.h" 3 4
typedef unsigned int size_t;
# 326 "/usr/local/lib/gcc/avr/4.3.0/include/stddef.h" 3 4
typedef int wchar_t;
# 6 "../rdm.h" 2
# 1 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/stdint.h" 1 3
# 121 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/stdint.h" 3
typedef int int8_t __attribute__((__mode__(__QI__)));
typedef unsigned int uint8_t __attribute__((__mode__(__QI__)));
typedef int int16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int uint16_t __attribute__ ((__mode__ (__HI__)));
typedef int int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int uint32_t __attribute__ ((__mode__ (__SI__)));
typedef int int64_t __attribute__((__mode__(__DI__)));
typedef unsigned int uint64_t __attribute__((__mode__(__DI__)));
# 142 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/stdint.h" 3
typedef int16_t intptr_t;
typedef uint16_t uintptr_t;
# 159 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/stdint.h" 3
typedef int8_t int_least8_t;
typedef uint8_t uint_least8_t;
typedef int16_t int_least16_t;
typedef uint16_t uint_least16_t;
typedef int32_t int_least32_t;
typedef uint32_t uint_least32_t;
typedef int64_t int_least64_t;
typedef uint64_t uint_least64_t;
# 213 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/stdint.h" 3
typedef int8_t int_fast8_t;
typedef uint8_t uint_fast8_t;
typedef int16_t int_fast16_t;
typedef uint16_t uint_fast16_t;
typedef int32_t int_fast32_t;
typedef uint32_t uint_fast32_t;
typedef int64_t int_fast64_t;
typedef uint64_t uint_fast64_t;
# 273 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/stdint.h" 3
typedef int64_t intmax_t;
typedef uint64_t uintmax_t;
# 7 "../rdm.h" 2
# 15 "../rdm.h"
enum {
PATHWAY_CHANNEL_STATE = 0x8001,
PATHWAY_CHASER_PATTERN = 0x8002,
PATHWAY_CHASER_RATE = 0x8003,
PATHWAY_CHASER_ACTIVE = 0x8004,
PATHWAY_SERIAL_NUMBER = 0x9040,
};
enum {
PATHWAY_MODEL_EDIN_BOOTLOADER = 1,
PATHWAY_MODEL_EDIN_DMX_MONITOR = 2,
PATHWAY_MODEL_EDIN_CCI = 1003,
PATHWAY_MODEL_EDIN_ANALOG_DEMULTIPLEX = 1004,
PATHWAY_MODEL_DOUGLAS_RELAY_DRIVER = 1005,
PATHWAY_MODEL_EDIN_ANALOG_MULTIPLEX = 1006,
PATHWAY_MODEL_EDIN_DMX_MERGER = 1007,
PATHWAY_MODEL_EDIN_DC_DRIVER = 1008,
PATHWAY_MODEL_OEM_REPEATER = 1009,
PATHWAY_MODEL_OEM_PWM_DRIVER = 1010,
PATHWAY_MODEL_RDM_REPEATER = 9100,
};
struct uid {
uint16_t manufacturer;
uint32_t uid;
} __attribute__((packed));
struct disc_unique_branch {
struct uid lower;
struct uid upper;
} __attribute__((packed));
struct device_info {
uint16_t protocol_version;
uint16_t device_model;
uint16_t product_category;
uint32_t software_version;
uint16_t dmx_footprint;
uint8_t dmx_personality;
uint8_t dmx_personalities;
uint16_t dmx_start_address;
uint16_t sub_device_count;
uint8_t sensor_count;
} __attribute__((packed));
struct rdm_packet {
uint8_t start_code;
uint8_t sub_start_code;
uint8_t checksum_offset;
struct uid dest;
struct uid src;
uint8_t transaction;
uint8_t response_type;
uint8_t msg_count;
uint16_t sub_device;
uint8_t command_class;
uint16_t pid;
uint8_t pdl;
uint8_t data[0];
} __attribute__((packed));
enum {
E120_FILES = 0x7fe0,
E120_FILE_DESCRIPTION = 0x7fe1,
E120_FILE_TRANSFER = 0x7fe2,
E120_FILE_COPY = 0x7fe3,
E120_FILE_EXECUTE = 0x7fe4,
};
struct rdm_files {
uint16_t files;
};
struct rdm_file_description {
uint16_t ino;
uint32_t size;
uint8_t flags;
uint8_t blksize;
char name[32];
} __attribute__((packed));
enum {
E120_FILE_READABLE = 0x04,
E120_FILE_WRITABLE = 0x02,
E120_FILE_EXECUTABLE = 0x01,
};
struct rdm_file_transfer {
uint16_t ino;
uint32_t offset;
uint8_t data[0];
} __attribute__((packed));
struct rdm_file_copy {
uint16_t destination_ino;
uint16_t source_ino;
};
struct rdm_file_execute {
uint16_t ino;
};
void rdm_receive(const void *packet);
# 141 "../rdm.h"
_Bool rdm_checksum(const struct rdm_packet *rdm);
const struct rdm_packet *rdm_read(struct rdm_packet *rdm);
void rdm_write(struct rdm_packet *rdm);
void rdm_init(void);
typedef uint64_t uid_t;
unsigned rdm_get(const uid_t *uid, uint16_t pid);
void rdm_htouid(struct uid *puid, const uid_t *pi);
struct rdm_packet *rdm_new(void);
void rdm_set(const uid_t *uid, uint16_t pid,
const void *buf, uint8_t n);
# 1 "../byteswap.h" 1
# 15 "../byteswap.h"
static inline uint16_t bswap_16_inline(uint16_t x)
{
union {
uint16_t x;
struct {
uint8_t a;
uint8_t b;
} s;
} in, out;
in.x = x;
out.s.a = in.s.b;
out.s.b = in.s.a;
return out.x;
}
static inline uint32_t bswap_32_inline(uint32_t x)
{
union {
uint32_t x;
struct {
uint8_t a;
uint8_t b;
uint8_t c;
uint8_t d;
} s;
} in, out;
in.x = x;
out.s.a = in.s.d;
out.s.b = in.s.c;
out.s.c = in.s.b;
out.s.d = in.s.a;
return out.x;
}
uint16_t bswap_16(uint16_t x);
uint32_t bswap_32(uint32_t x);
# 156 "../rdm.h" 2
static inline void rdm_set8(const uid_t *uid,
uint16_t pid, uint8_t data) {
rdm_set(uid, pid, &data, sizeof data);
}
static inline void rdm_set8_all(uint16_t pid, uint8_t data)
{
rdm_set8(((void *)0), pid, data);
}
static inline void rdm_set16(const uid_t *uid,
uint16_t pid, uint16_t data) {
uint16_t n = bswap_16(data);
rdm_set(uid, pid, &n, sizeof n);
}
_Bool rdm_discover_before(uid_t *uid);
_Bool rdm_discover_after(uid_t *uid);
# 5 "../fs.h" 2
# 1 "../sys/types.h" 1
# 1 "/usr/local/lib/gcc/avr/4.3.0/include/stddef.h" 1 3 4
# 5 "../sys/types.h" 2
typedef uint8_t ino_t;
typedef int off_t;
typedef int ssize_t;
# 6 "../fs.h" 2
enum {
INO_FIRMWARE = 1,
INO_BOOTLOADER = 2,
INO_SNAPSHOT = 3,
};
int fs_access(ino_t ino, uint8_t mode);
int fs_exec(ino_t ino);
ssize_t fs_read(ino_t ino, void *buf, size_t count, off_t offset);
ssize_t fs_stat(ino_t ino, struct rdm_file_description *buf);
ssize_t fs_write(ino_t ino, const void *buf, size_t count,
off_t offset);
int fs_truncate(ino_t ino, off_t length);
# 2 "../fs.c" 2
# 1 "../header.h" 1
# 1 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/avr/pgmspace.h" 1 3
# 79 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/avr/pgmspace.h" 3
# 1 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/inttypes.h" 1 3
# 77 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/inttypes.h" 3
typedef int32_t int_farptr_t;
typedef uint32_t uint_farptr_t;
# 80 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/avr/pgmspace.h" 2 3
# 1 "/usr/local/lib/gcc/avr/4.3.0/include/stddef.h" 1 3 4
# 81 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/avr/pgmspace.h" 2 3
# 1 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/avr/io.h" 1 3
# 87 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/avr/io.h" 3
# 1 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/avr/sfr_defs.h" 1 3
# 88 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/avr/io.h" 2 3
# 218 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/avr/io.h" 3
# 1 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/avr/iom64.h" 1 3
# 219 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/avr/io.h" 2 3
# 352 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/avr/io.h" 3
# 1 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/avr/portpins.h" 1 3
# 353 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/avr/io.h" 2 3
# 362 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/avr/io.h" 3
# 1 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/avr/version.h" 1 3
# 363 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/avr/io.h" 2 3
# 82 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/avr/pgmspace.h" 2 3
# 210 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/avr/pgmspace.h" 3
typedef void prog_void __attribute__((__progmem__));
typedef char prog_char __attribute__((__progmem__));
typedef unsigned char prog_uchar __attribute__((__progmem__));
typedef int8_t prog_int8_t __attribute__((__progmem__));
typedef uint8_t prog_uint8_t __attribute__((__progmem__));
typedef int16_t prog_int16_t __attribute__((__progmem__));
typedef uint16_t prog_uint16_t __attribute__((__progmem__));
typedef int32_t prog_int32_t __attribute__((__progmem__));
typedef uint32_t prog_uint32_t __attribute__((__progmem__));
typedef int64_t prog_int64_t __attribute__((__progmem__));
typedef uint64_t prog_uint64_t __attribute__((__progmem__));
# 615 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/avr/pgmspace.h" 3
extern int memcmp_P(const void *, const prog_void *, size_t) __attribute__((__pure__));
extern void *memcpy_P(void *, const prog_void *, size_t);
extern char *strcat_P(char *, const prog_char *);
extern const prog_char * strchr_P(const prog_char * s, int val) __attribute__((__const__));
extern int strcmp_P(const char *, const prog_char *) __attribute__((__pure__));
extern char *strcpy_P(char *, const prog_char *);
extern int strcasecmp_P(const char *, const prog_char *) __attribute__((__pure__));
extern size_t strlcat_P (char *, const prog_char *, size_t );
extern size_t strlcpy_P (char *, const prog_char *, size_t );
extern size_t strlen_P(const prog_char *) __attribute__((__const__));
extern size_t strnlen_P(const prog_char *, size_t) __attribute__((__const__));
extern int strncmp_P(const char *, const prog_char *, size_t) __attribute__((__pure__));
extern int strncasecmp_P(const char *, const prog_char *, size_t) __attribute__((__pure__));
extern char *strncat_P(char *, const prog_char *, size_t);
extern char *strncpy_P(char *, const prog_char *, size_t);
extern char *strpbrk_P(const char *s, const prog_char * accept) __attribute__((__pure__));
extern char *strstr_P(const char *, const prog_char *) __attribute__((__pure__));
# 5 "../header.h" 2
struct firmware_header {
uint16_t manufacturer;
uint16_t model;
uint32_t version;
uint16_t start;
uint16_t end;
uint32_t zero;
char manufacturer_label[32];
char model_description[32];
char version_label[32];
};
extern const struct firmware_header __attribute__((__progmem__)) firmware_header;
# 3 "../fs.c" 2
# 1 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/avr/interrupt.h" 1 3
# 4 "../fs.c" 2
# 1 "../sys/param.h" 1
# 22 "../sys/param.h"
# 1 "/usr/local/lib/gcc/avr/4.3.0/include/limits.h" 1 3 4
# 23 "../sys/param.h" 2
# 5 "../fs.c" 2
enum {
FIRMWARE_SIZE = 32767,
};
static off_t firmware_base(ino_t ino)
{
switch (ino) {
case INO_FIRMWARE:
return 0;
case INO_BOOTLOADER:
return 0xe000;
}
return 0;
}
static size_t firmware_size(ino_t ino)
{
off_t base = firmware_base(ino);
off_t start = (__extension__({ uint16_t __addr16 = (uint16_t)((uint16_t)(base + 0x8c + __builtin_offsetof (struct firmware_header, start))); uint16_t __result; __asm__ ( "lpm %A0, Z+" "\n\t" "lpm %B0, Z" "\n\t" : "=r" (__result), "=z" (__addr16) : "1" (__addr16) ); __result; }));
off_t end = (__extension__({ uint16_t __addr16 = (uint16_t)((uint16_t)(base + 0x8c + __builtin_offsetof (struct firmware_header, end))); uint16_t __result; __asm__ ( "lpm %A0, Z+" "\n\t" "lpm %B0, Z" "\n\t" : "=r" (__result), "=z" (__addr16) : "1" (__addr16) ); __result; }));
return (((0)>(end - start))?(0):(end - start));
}
# 1 "/usr/local/lib/gcc/avr/4.3.0/../../../../avr/include/avr/wdt.h" 1 3
# 33 "../fs.c" 2
int fs_exec(ino_t ino)
{
prog_void *src;
switch (ino) {
case INO_BOOTLOADER:
__asm__ __volatile__ ( "in __tmp_reg__,__SREG__" "\n\t" "cli" "\n\t" "wdr" "\n\t" "out %0,%1" "\n\t" "out __SREG__,__tmp_reg__" "\n\t" "out %0,%2" : : "I" ((((uint16_t) &((*(volatile uint8_t *)((0x21) + 0x20)))) - 0x20)), "r" ((1 << (4)) | (1 << (3))), "r" ((uint8_t) ((0 & 0x08 ? 0x00 : 0x00) | (1 << (3)) | (0 & 0x07)) ) : "r0" );
for (;;);
case INO_FIRMWARE:
src = (prog_void *)firmware_base(ino);
break;
default:
return -1;
}
if (firmware_size(ino) == 0)
return -1;
(*(volatile uint8_t *)((0x35) + 0x20)) = 1<<0;
(*(volatile uint8_t *)((0x35) + 0x20)) = 0;
goto *src;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: r122342 ICE tree check at tree-cfg.c:2042
2007-02-27 18:57 r122342 ICE tree check at tree-cfg.c:2042 Shaun Jackman
@ 2007-02-27 19:08 ` Andrew Pinski
2007-02-27 21:51 ` Shaun Jackman
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Pinski @ 2007-02-27 19:08 UTC (permalink / raw)
To: Shaun Jackman; +Cc: GCC Bugs
On 2/27/07, Shaun Jackman <sjackman@gmail.com> wrote:
> $ avr-gcc -mmcu=atmega64 -g -O2 -Wall -Wextra -Werror -Os -I.. -I.
I submitted http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30984 for this
bug. It is a generic issue.
Thanks,
Andrew Pinski
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: r122342 ICE tree check at tree-cfg.c:2042
2007-02-27 19:08 ` Andrew Pinski
@ 2007-02-27 21:51 ` Shaun Jackman
0 siblings, 0 replies; 3+ messages in thread
From: Shaun Jackman @ 2007-02-27 21:51 UTC (permalink / raw)
To: Andrew Pinski; +Cc: GCC Bugs
On 2/27/07, Andrew Pinski <pinskia@gmail.com> wrote:
> On 2/27/07, Shaun Jackman <sjackman@gmail.com> wrote:
> > $ avr-gcc -mmcu=atmega64 -g -O2 -Wall -Wextra -Werror -Os -I.. -I.
>
> I submitted http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30984 for this
> bug. It is a generic issue.
Thanks, Andrew! I'd like to know the revision where this bug was
created, if someone happens to discover it.
Cheers,
Shaun
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-02-27 21:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-27 18:57 r122342 ICE tree check at tree-cfg.c:2042 Shaun Jackman
2007-02-27 19:08 ` Andrew Pinski
2007-02-27 21:51 ` Shaun Jackman
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).