3 // Copyright (C) 2001 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 31 Dec 2001 <nathan@codesourcery.com>
6 // PR 5132. ICE on struct constructors in templates.
8 // snippets from bits/huge_val.h
10 #define __HUGE_VAL_bytes { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }
11 #define __huge_val_t union { unsigned char __c[8]; double __d; }
12 #define HUGE_VAL (__extension__ \
13 ((__huge_val_t) { __c: __HUGE_VAL_bytes }).__d)
15 void foo( const int&) {
16 HUGE_VAL; // no problem here
20 void Tfoo( const F&) {
21 HUGE_VAL; // g++ fails here
24 template <typename T> struct M { T m; };
29 (__extension__ ((M<int>) {m:3}));
30 (__extension__ ((M<short> []) {{m:3}}));