public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/11303] ICE in stor-layout.c:304 in int_mode_for_mode
  2003-06-24  5:41 [Bug target/11303] New: ICE in stor-layout.c:304 in int_mode_for_mode pinskia at physics dot uc dot edu
@ 2003-06-24  5:41 ` pinskia at physics dot uc dot edu
  2003-06-24  6:07 ` pinskia at physics dot uc dot edu
  2003-07-05 20:11 ` [Bug target/11303] [3.3/3.4 regression] " dhazeghi at yahoo dot com
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-06-24  5:41 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11303


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|11026                       |
              nThis|                            |


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/11303] New: ICE in stor-layout.c:304 in int_mode_for_mode
@ 2003-06-24  5:41 pinskia at physics dot uc dot edu
  2003-06-24  5:41 ` [Bug target/11303] " pinskia at physics dot uc dot edu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-06-24  5:41 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11303

           Summary: ICE in stor-layout.c:304 in int_mode_for_mode
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at physics dot uc dot edu
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: powerpc-apple-darwin6.6
OtherBugsDependingO 11026
             nThis:

A fall out from 11026:
Here is the shortest test case I could come up with that causes this ICE (fixing 
s_callbacks by adding & fixes the ICE:
template <class T>
struct test
{
  int run(int);

  typedef int (test<T>::*callback_type)(int);

  int c1(int);
  int c2(int);

  static callback_type s_callbacks[];
};

template <class T>
int test<T>::run(int i)
{
  callback_type c = s_callbacks[i];
  return (this->*c)(i);
}

template <class T>
typename test<T>::callback_type test<T>::s_callbacks[] =
{
  test<T>::c1,
  test<T>::c2,
};


int main()
{
  test<int> i;
  i.run(0);
  return 0;
}


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/11303] ICE in stor-layout.c:304 in int_mode_for_mode
  2003-06-24  5:41 [Bug target/11303] New: ICE in stor-layout.c:304 in int_mode_for_mode pinskia at physics dot uc dot edu
  2003-06-24  5:41 ` [Bug target/11303] " pinskia at physics dot uc dot edu
@ 2003-06-24  6:07 ` pinskia at physics dot uc dot edu
  2003-07-05 20:11 ` [Bug target/11303] [3.3/3.4 regression] " dhazeghi at yahoo dot com
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-06-24  6:07 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11303


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |11026
              nThis|                            |


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/11303] [3.3/3.4 regression] ICE in stor-layout.c:304 in int_mode_for_mode
  2003-06-24  5:41 [Bug target/11303] New: ICE in stor-layout.c:304 in int_mode_for_mode pinskia at physics dot uc dot edu
  2003-06-24  5:41 ` [Bug target/11303] " pinskia at physics dot uc dot edu
  2003-06-24  6:07 ` pinskia at physics dot uc dot edu
@ 2003-07-05 20:11 ` dhazeghi at yahoo dot com
  2 siblings, 0 replies; 4+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-07-05 20:11 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11303


dhazeghi at yahoo dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-07-05 20:11:50
               date|                            |
            Summary|ICE in stor-layout.c:304 in |[3.3/3.4 regression] ICE in
                   |int_mode_for_mode           |stor-layout.c:304 in
                   |                            |int_mode_for_mode


------- Additional Comments From dhazeghi at yahoo dot com  2003-07-05 20:11 -------
Question: is this code valid? On i686-linux (mainline and branch), I get:
 int test<T>::run(int) int main() int test<T>::run(int) [with T = int]
foo.cc: At global scope:
foo.cc: In instantiation of `int (test<int>::*test<int>::s_callbacks[2])(int)':
foo.cc:17:   instantiated from `int test<T>::run(int) [with T = int]'
foo.cc:32:   instantiated from here
foo.cc:22: error: invalid use of non-static member function

gcc 3.2.3 and earlier (on powerpc-darwin and i686-linux) give:
foo.cc: In instantiation of `int (test<int>::*test<int>::s_callbacks[])(int)':
foo.cc:17:   instantiated from `int test<T>::run(int) [with T = int]'
foo.cc:32:   instantiated from here
foo.cc:22: assuming pointer to member `int test<T>::c1(int) [with T = int]'
foo.cc:22: (a pointer to member can only be formed with `&test<T>::c1(int) 
   [with T = int]')

I can confirm the ICE with mainline and branch on powerpc-darwin (20030705).


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-07-05 20:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-24  5:41 [Bug target/11303] New: ICE in stor-layout.c:304 in int_mode_for_mode pinskia at physics dot uc dot edu
2003-06-24  5:41 ` [Bug target/11303] " pinskia at physics dot uc dot edu
2003-06-24  6:07 ` pinskia at physics dot uc dot edu
2003-07-05 20:11 ` [Bug target/11303] [3.3/3.4 regression] " dhazeghi at yahoo dot com

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).