EXHIBIT 5 June 27, 2001 CGI Group Inc. 1130 Sherbrooke Street West Montreal (Quebec) H3A 2M8 Canada Dear Sirs: We have acted as Canadian counsel to CGI Group Inc. ("CGI"), a company organized under Part IA of the Companies Act (Quebec) (the "Act"), in order to render this opinion which is included as an exhibit to a Registration Statement on Form F-4 (Registration No. 333-58116) under the Securities Act of 1933, as amended ("Registration Statement"), covering an aggregate 70,400,000 Class A Subordinate Shares and any additional Class A Subordinate Shares (the "Class A Shares") of CGI to be issued in connection with the merger of IMRglobal Corp. and CGI Florida Corporation, a wholly owned subsidiary of CGI, pursuant to the Agreement and Plan of Merger dated as of February 21, 2001 (the "Merger Agreement"). We have examined such records, certificates and other documents, including a copy of the resolutions of the Board of Directors of CGI adopted in relation to the issuance of the Class A Shares, and such questions of law, as have been considered necessary or appropriate for the purposes of this opinion. Based on the foregoing, we confirm to you that, in our opinion: 1. CGI is a company duly organized and validly existing under Part IA of the Act. 2. All necessary corporate action has been taken by CGI to authorize the issuance of the Class A Shares. 3. The Class A Shares, when issued in accordance with the terms of the Registration Statement and the Merger Agreement, will be validly issued and outstanding as fully paid and non-assessable shares of CGI. We have relied, as to certain matters of fact, on information obtained from public officials, officers of CGI and other sources believed by us to be responsible, and we have assumed the genuineness of all signatures, the authenticity of all documents submitted to us as originals and the conformity to original documents of all documents submitted to us as certified, conformed or photostatic copies. We express no opinion as to the laws of any jurisdiction other than the laws of the Province of Quebec and the federal laws of Canada applicable therein in force on the date hereof. This opinion is addressed to you for your own purpose in connection with the Registration Statement and may not be transmitted or disclosed to or used by any other person or for any other purposes without our prior written consent. We hereby give such consent in relation to the filing of this letter as an exhibit to the Registration Statement. In giving such consent we do not thereby admit that we are within the category of persons whose consent is required under section 7 of the Securities Act of 1933, as amended. Yours very truly, /s/ McCarthy Tetrault ----------------------------------------- MCCARTHY TETRAULT