public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tahasuf at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/95181] internal compiler error: in push_access_scope, at cp/pt.c:241
Date: Sun, 17 May 2020 22:32:41 +0000	[thread overview]
Message-ID: <bug-95181-4-LEvIdoE5Ml@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-95181-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95181

--- Comment #3 from ahmet özhan <tahasuf at gmail dot com> ---
Comment on attachment 48554
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48554
gcc 10 don't compile but clang compile

>#include <array>
>
>namespace math {
>	
>	template <typename T, std::size_t Row, std::size_t Col>
>	requires std::is_arithmetic_v<T>
>	class matrix {
>		union {
>			std::array<T, Row * Col> m_elements_1d;
>			std::array<std::array<T, Col>, Row> m_elements_2d;
>		};
>		
>	public:
>		template <typename ...Args>
>		requires
>			std::conjunction_v<std::is_same<T, Args>...>
>		constexpr matrix(const Args&... args) noexcept
>			: m_elements_1d {{ args... }} {}
>		
>		template <typename ...Args>
>		requires
>			std::conjunction_v<std::is_same<std::array<T, Col>, Args>...>
>		constexpr matrix(const Args&... args) noexcept
>			: m_elements_2d {{ args... }} {}
>	};
>}
>
>#include <iostream>
>
>template <typename T>
>void test() {
>	
>	T f1, f2, f3, f4, f5, f6, f7, f8;
>	
>	std::cin >> f1 >> f2 >> f3 >> f4 >> f5 >> f6 >> f7 >> f8;
>	math::matrix<T, 4, 4> m0(
>		std::array<T, 4> {{ f1, f2, f3, f4 }},
>		std::array<T, 4> {{ f5, f6, f7, f8 }}
>	);
>}
>
>int main(int argc, char **argv)
>{
>	test<float>();
>	return 0;
>}

  parent reply	other threads:[~2020-05-17 22:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-17 22:25 [Bug c++/95181] New: " tahasuf at gmail dot com
2020-05-17 22:29 ` [Bug c++/95181] " tahasuf at gmail dot com
2020-05-17 22:31 ` tahasuf at gmail dot com
2020-05-17 22:32 ` tahasuf at gmail dot com [this message]
2020-05-18  6:10 ` [Bug c++/95181] [10/11 Regression] ICE in push_access_scope, at cp/pt.c:241 since r10-3735-gcb57504a55015891 marxin at gcc dot gnu.org
2020-05-18  6:29 ` rguenth at gcc dot gnu.org
2020-05-18 12:43 ` ppalka at gcc dot gnu.org
2020-05-18 20:40 ` ppalka at gcc dot gnu.org
2020-05-28 15:51 ` ppalka at gcc dot gnu.org
2020-05-29 22:15 ` jason at gcc dot gnu.org
2020-05-29 22:19 ` cvs-commit at gcc dot gnu.org
2020-05-30  2:11 ` cvs-commit at gcc dot gnu.org
2020-06-01 19:51 ` jason at gcc dot gnu.org

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-95181-4-LEvIdoE5Ml@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: link
Be 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).