public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "law at redhat dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/58400] gcc for h8300 internal compiler error: insn does not satisfy its constraints at fs/ext4/mballoc.c: In function 'mb_free_blocks': Date: Fri, 13 Sep 2013 20:42:00 -0000 [thread overview] Message-ID: <bug-58400-4-3XN9snVczr@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-58400-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58400 --- Comment #6 from Jeffrey A. Law <law at redhat dot com> --- Reduced testcase: static __inline__ __attribute__((always_inline)) __attribute__((no_instrument_function)) int test_bit(int nr, const unsigned long* addr) { return (*((volatile unsigned char *)addr + ((nr >> 3) ^ 3)) & (1UL << (nr & 7))) != 0; } static inline __attribute__((always_inline)) __attribute__((no_instrument_function)) int test_bit_le(int nr, const void *addr) { return test_bit(nr ^ ((32 -1) & ~0x7), addr); } typedef int ext4_grpblk_t; struct ext4_group_info { unsigned long bb_state; ext4_grpblk_t bb_counters[]; }; struct ext4_buddy { struct super_block *bd_sb; struct ext4_group_info *bd_info; }; static inline __attribute__((always_inline)) __attribute__((no_instrument_function)) void *mb_correct_addr_and_bit(int *bit, void *addr) { *bit += ((unsigned long) addr & 3UL) << 3; return addr; } static inline __attribute__((always_inline)) __attribute__((no_instrument_function)) int mb_test_bit(int bit, void *addr) { addr = mb_correct_addr_and_bit(&bit, addr); return test_bit_le(bit, addr); } static inline __attribute__((always_inline)) __attribute__((no_instrument_function)) void mb_clear_bit(int bit, void *addr) { addr = mb_correct_addr_and_bit(&bit, addr); __clear_bit_le(bit, addr); } static inline __attribute__((always_inline)) __attribute__((no_instrument_function)) int mb_buddy_adjust_border(int* bit, void* bitmap, int side) { if (mb_test_bit(*bit + side, bitmap)) { mb_clear_bit(*bit, bitmap); } } static void mb_buddy_mark_free(struct ext4_buddy *e4b, int first) { int max; int order = 1; void *buddy = bar (); while (buddy) { void *buddy2; e4b->bd_info->bb_counters[order] += mb_buddy_adjust_border(&first, buddy, -1); order++; buddy = buddy2; } } void mb_free_blocks(struct inode *inode, struct ext4_buddy *e4b, int first, int count) { int last = first + count - 1; int block; struct super_block *sb = e4b->bd_sb; block = foo(); if (!!(block != -1)) mb_regenerate_buddy(); mb_buddy_mark_free(e4b, first >> 1); }
next prev parent reply other threads:[~2013-09-13 20:42 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-09-12 3:58 [Bug c/58400] New: " gang.chen at asianux dot com 2013-09-12 3:59 ` [Bug c/58400] " gang.chen at asianux dot com 2013-09-12 4:00 ` gang.chen at asianux dot com 2013-09-12 4:02 ` gang.chen at asianux dot com 2013-09-13 3:12 ` gang.chen at asianux dot com 2013-09-13 20:42 ` law at redhat dot com 2013-09-13 20:42 ` law at redhat dot com [this message] 2013-09-13 20:43 ` law at redhat dot com 2013-09-13 20:44 ` law at redhat dot com 2014-03-06 12:21 ` [Bug target/58400] " amylaar at gcc dot gnu.org 2015-01-21 10:00 ` gang.chen.5i5j at gmail dot com 2015-02-01 5:16 ` ysato at users dot sourceforge.jp 2015-02-02 1:43 ` gang.chen.5i5j at gmail dot com 2015-02-02 14:10 ` law at redhat dot com 2015-02-02 19:59 ` gang.chen.5i5j at gmail dot com 2015-02-02 20:24 ` joern.rennecke at embecosm dot com 2015-02-03 0:11 ` law at redhat dot com 2015-02-03 12:19 ` gang.chen.5i5j at gmail dot com 2015-02-05 17:05 ` law at redhat dot com 2015-02-05 17:21 ` law at redhat 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-58400-4-3XN9snVczr@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: linkBe 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).